Author: robbie Date: Wed Nov 17 00:31:02 2010 New Revision: 1035880 URL: http://svn.apache.org/viewvc?rev=1035880&view=rev Log: QPID-2950: correct the shutdown exception check to verify the SQLCode is for single-db shutdown rather than full Derby engine shutdown
Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java?rev=1035880&r1=1035879&r2=1035880&view=diff ============================================================================== --- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java (original) +++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java Wed Nov 17 00:31:02 2010 @@ -134,6 +134,8 @@ public class DerbyMessageStore implement private static final String DELETE_FROM_META_DATA = "DELETE FROM " + META_DATA_TABLE_NAME + " WHERE message_id = ?"; private static final String SELECT_ALL_FROM_META_DATA = "SELECT message_id, meta_data FROM " + META_DATA_TABLE_NAME; + private static final String DERBY_SINGLE_DB_SHUTDOWN_CODE = "08006"; + private LogSubject _logSubject; private boolean _configured; @@ -631,9 +633,9 @@ public class DerbyMessageStore implement } catch (SQLException e) { - if (e.getSQLState().equalsIgnoreCase("XJ015")) + if (e.getSQLState().equalsIgnoreCase(DERBY_SINGLE_DB_SHUTDOWN_CODE)) { - //XJ015 is expected and represents a clean shutdown, do nothing. + //expected and represents a clean shutdown of this database only, do nothing. } else { --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org