ensure embedded jdbc is shutdown

This commit is contained in:
gtully 2015-04-28 12:42:21 +01:00
parent 81b8403f33
commit bcdf770c10
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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()));