mirror of https://github.com/apache/activemq.git
Do a bit more resource cleanup on tearDown
This commit is contained in:
parent
f595f3c20d
commit
0b65c8d93c
|
@ -41,6 +41,7 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
|
|||
|
||||
private static final String DEFAULT_HOST = "vm://localhost?create=false";
|
||||
|
||||
private ManagedConnectionProxy cx2;
|
||||
private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
|
||||
private static long txGenerator;
|
||||
private Xid xid;
|
||||
|
@ -53,6 +54,15 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
|
|||
super.setUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
if (cx2 != null) {
|
||||
cx2.close();
|
||||
}
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setSessionTransacted() {
|
||||
resourceProvider.setTransacted(false);
|
||||
|
@ -90,7 +100,7 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
|
|||
protected void reconnect() throws Exception {
|
||||
super.reconnect();
|
||||
xares[0] = getXAResource(connection);
|
||||
ManagedConnectionProxy cx2 = (ManagedConnectionProxy) connectionFactory.createConnection();
|
||||
cx2 = (ManagedConnectionProxy) connectionFactory.createConnection();
|
||||
xares[1] = getXAResource(cx2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue