Ignore:
Timestamp:
2015-07-20T17:51:14+12:00 (9 years ago)
Author:
ak19
Message:

Fixed a bug in shutting down the derbyserver. Noticed on Windows after previewing in GLI and then quitting GLI, the DOS prompt with the tomcat output displayed the message Warning: Derby did not shut down normally. Actually it had shut down but the code re-structure was wrong for when the message gets displayed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DerbyWrapper.java

    r29977 r30043  
    131131    public static void shutdownDatabaseServer()
    132132    {
     133
     134        // shutdown the server if we're using an embedded derby
     135        // if we're a derby client using the derby network server
     136       
     137        if(!DRIVER.equals("org.apache.derby.jdbc.EmbeddedDriver")) {
     138            return;
     139        }
     140
    133141        boolean gotSQLExc = false;
    134 
    135         try
    136         {
    137             //  shutdown the whole server
    138             // but not if we're a derby client using the derby network server
    139             // only if we're using an embedded derby
    140             if(DRIVER.equals("org.apache.derby.jdbc.EmbeddedDriver")) {
    141             DriverManager.getConnection(PROTOCOL + ";shutdown=true");
    142             }
     142        try
     143        {
     144            DriverManager.getConnection(PROTOCOL + ";shutdown=true");
    143145        }
    144146        catch (SQLException se)
Note: See TracChangeset for help on using the changeset viewer.