This commit is contained in:
Clebert Suconic 2018-03-27 09:59:57 -04:00
commit caa19647ae
7 changed files with 9 additions and 4 deletions

View File

@ -95,6 +95,7 @@ public abstract class AbstractJDBCDriver {
synchronized (connection) {
if (sqlProvider.closeConnectionOnShutdown()) {
try {
connection.setAutoCommit(true);
connection.close();
} catch (SQLException e) {
logger.error(JDBCUtils.appendSQLExceptionDetails(new StringBuilder(), e));

View File

@ -82,7 +82,7 @@ public class JDBCUtils {
errorMessage.append(' ');
}
formatSqlException(errorMessage, nextEx);
nextEx = exception.getNextException();
nextEx = nextEx.getNextException();
level++;
}
while (nextEx != null);

View File

@ -84,3 +84,6 @@ create-journal-table.oracle=CREATE TABLE %s(id NUMBER(19),recordType NUMBER(5),c
# 4 GiB
max-blob-size.oracle=4294967296
table-names-case.oracle=upper
# DB2 SQL statements
create-file-table.db2=CREATE TABLE %s (ID BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1), FILENAME VARCHAR(255), EXTENSION VARCHAR(10), DATA BLOB, PRIMARY KEY(ID))

View File

@ -511,6 +511,7 @@ public abstract class ActiveMQTestBase extends Assert {
connection.rollback();
}
}
connection.setAutoCommit(true);
} catch (Throwable e) {
e.printStackTrace();
} finally {

View File

@ -83,7 +83,7 @@ public abstract class LargeMessageTestBase extends ActiveMQTestBase {
public void tearDown() throws Exception {
super.tearDown();
if (storeType == StoreConfiguration.StoreType.DATABASE) {
destroyTables(Arrays.asList("BINDINGS", "LARGE_MESSAGE", "MESSAGE"));
destroyTables(Arrays.asList("BINDINGS", "LARGE_MESSAGE", "MESSAGE", "NODE_MANAGER_STORE"));
}
}

View File

@ -111,7 +111,7 @@ public abstract class StorageManagerTestBase extends ActiveMQTestBase {
scheduledExecutorService.shutdown();
destroyTables(Arrays.asList(new String[]{"MESSAGE", "BINDINGS", "LARGE_MESSAGE"}));
destroyTables(Arrays.asList(new String[]{"MESSAGE", "BINDINGS", "LARGE_MESSAGE", "NODE_MANAGER_STORE"}));
super.tearDown();
if (exception != null)
throw exception;

View File

@ -123,7 +123,7 @@ public class BasicXaRecoveryTest extends ActiveMQTestBase {
MBeanServerFactory.releaseMBeanServer(mbeanServer);
super.tearDown();
if (storeType == StoreConfiguration.StoreType.DATABASE) {
destroyTables(Arrays.asList("BINDINGS", "LARGE_MESSAGE", "MESSAGE"));
destroyTables(Arrays.asList("BINDINGS", "LARGE_MESSAGE", "MESSAGE", "NODE_MANAGER_STORE"));
}
}