activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: ensure embedded jdbc is shutdown
Date Tue, 28 Apr 2015 11:42:43 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 81b8403f3 -> bcdf770c1


ensure embedded jdbc is shutdown


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/bcdf770c
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/bcdf770c
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/bcdf770c

Branch: refs/heads/master
Commit: bcdf770c106396535b285692ad21b47045b7c835
Parents: 81b8403
Author: gtully <gary.tully@gmail.com>
Authored: Tue Apr 28 12:42:21 2015 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Tue Apr 28 12:42:21 2015 +0100

----------------------------------------------------------------------
 .../apache/activemq/store/jdbc/DataSourceServiceSupport.java    | 1 +
 .../src/test/java/org/apache/activemq/bugs/AMQ5567Test.java     | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/bcdf770c/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/DataSourceServiceSupport.java
----------------------------------------------------------------------
diff --git a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/DataSourceServiceSupport.java
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/DataSourceServiceSupport.java
index 31835ba..db1888d 100644
--- a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/DataSourceServiceSupport.java
+++ b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/DataSourceServiceSupport.java
@@ -80,6 +80,7 @@ abstract public class DataSourceServiceSupport extends LockableServiceSupport
{
     public void closeDataSource(DataSource dataSource) {
         if (createdDefaultDataSource != null && createdDefaultDataSource.equals(dataSource))
{
             shutdownDefaultDataSource(dataSource);
+            createdDefaultDataSource = this.dataSource = null;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/bcdf770c/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
index a8739ae..c0e1c14 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java
@@ -37,7 +37,6 @@ import org.apache.activemq.command.MessageAck;
 import org.apache.activemq.command.ProducerInfo;
 import org.apache.activemq.command.SessionInfo;
 import org.apache.activemq.command.XATransactionId;
-import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
 import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
@@ -66,7 +65,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport {
         PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{
                 new KahaDBPersistenceAdapter(),
                 new LevelDBPersistenceAdapter(),
-                new JDBCPersistenceAdapter(JDBCPersistenceAdapter.createDataSource(IOHelper.getDefaultDataDirectory()),
new OpenWireFormat())
+                new JDBCPersistenceAdapter()
         };
         for (PersistenceAdapter adapter : persistenceAdapters) {
             adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory()));
@@ -134,7 +133,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport {
         PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[]{
                 new KahaDBPersistenceAdapter(),
                 new LevelDBPersistenceAdapter(),
-                new JDBCPersistenceAdapter(JDBCPersistenceAdapter.createDataSource(IOHelper.getDefaultDataDirectory()),
new OpenWireFormat())
+                new JDBCPersistenceAdapter()
         };
         for (PersistenceAdapter adapter : persistenceAdapters) {
             adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory()));


Mime
View raw message