qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1773261 - in /qpid/java/branches/6.1.x: ./ broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/ broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/
Date Thu, 08 Dec 2016 16:13:05 GMT
Author: kwall
Date: Thu Dec  8 16:13:05 2016
New Revision: 1773261

URL: http://svn.apache.org/viewvc?rev=1773261&view=rev
Log:
QPID-7577: [Java Broker] Set correct state on initialization of generic JDBC configuration
store

Merged from trunk with command:

svn merge -c 1773057  ^/qpid/java/trunk

Added:
    qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStoreTest.java
      - copied unchanged from r1773057, qpid/java/trunk/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStoreTest.java
Modified:
    qpid/java/branches/6.1.x/   (props changed)
    qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java
    qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreTest.java

Propchange: qpid/java/branches/6.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  8 16:13:05 2016
@@ -9,5 +9,5 @@
 /qpid/branches/java-broker-vhost-refactor/java:1493674-1494547
 /qpid/branches/java-network-refactor/qpid/java:805429-821809
 /qpid/branches/qpid-2935/qpid/java:1061302-1072333
-/qpid/java/trunk:1766544,1766547,1766553,1766666,1766796-1766797,1766806,1767251,1767267-1767268,1767275,1767310,1767326,1767329,1767332,1767514,1767523,1767738,1767825,1767847-1767849,1767882,1767909,1767914,1768016-1768017,1768065,1768643,1768704,1768854,1768875,1768914,1768963,1768967,1768976,1769007,1769009,1769087,1769138-1769139,1769597,1769879,1770236,1770716,1772241
+/qpid/java/trunk:1766544,1766547,1766553,1766666,1766796-1766797,1766806,1767251,1767267-1767268,1767275,1767310,1767326,1767329,1767332,1767514,1767523,1767738,1767825,1767847-1767849,1767882,1767909,1767914,1768016-1768017,1768065,1768643,1768704,1768854,1768875,1768914,1768963,1768967,1768976,1769007,1769009,1769087,1769138-1769139,1769597,1769879,1770236,1770716,1772241,1773057
 /qpid/trunk/qpid:796646-796653

Modified: qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java?rev=1773261&r1=1773260&r2=1773261&view=diff
==============================================================================
--- qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java
(original)
+++ qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java
Thu Dec  8 16:13:05 2016
@@ -19,8 +19,8 @@
 package org.apache.qpid.server.store.jdbc;
 
 
+import static org.apache.qpid.server.store.AbstractJDBCConfigurationStore.State.CLOSED;
 import static org.apache.qpid.server.store.AbstractJDBCConfigurationStore.State.CONFIGURED;
-import static org.apache.qpid.server.store.AbstractJDBCConfigurationStore.State.OPEN;
 
 import java.io.File;
 import java.nio.charset.Charset;
@@ -77,7 +77,7 @@ public class GenericJDBCConfigurationSto
     public void init(ConfiguredObject<?> parent)
             throws StoreException
     {
-        changeState(CONFIGURED, OPEN);
+        changeState(CLOSED, CONFIGURED);
 
         _parent = parent;
 

Modified: qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreTest.java?rev=1773261&r1=1773260&r2=1773261&view=diff
==============================================================================
--- qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreTest.java
(original)
+++ qpid/java/branches/6.1.x/broker-plugins/jdbc-store/src/test/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreTest.java
Thu Dec  8 16:13:05 2016
@@ -45,7 +45,10 @@ public class JDBCMessageStoreTest extend
     {
         try
         {
-            shutdownDerby();
+            if (_connectionURL != null)
+            {
+                shutdownDerby(_connectionURL);
+            }
         }
         finally
         {
@@ -128,13 +131,12 @@ public class JDBCMessageStoreTest extend
         return DriverManager.getConnection(_connectionURL);
     }
 
-
-    private void shutdownDerby() throws SQLException
+    public static void shutdownDerby(String connectionURL) throws SQLException
     {
         Connection connection = null;
         try
         {
-            connection = DriverManager.getConnection("jdbc:derby:memory:/" + getTestName()
+ ";shutdown=true");
+            connection = DriverManager.getConnection(connectionURL);
         }
         catch(SQLException e)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message