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 static final String DEFAULT_HOST = "vm://localhost?create=false";
|
||||||
|
|
||||||
|
private ManagedConnectionProxy cx2;
|
||||||
private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
|
private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
|
||||||
private static long txGenerator;
|
private static long txGenerator;
|
||||||
private Xid xid;
|
private Xid xid;
|
||||||
|
@ -53,6 +54,15 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tearDown() throws Exception {
|
||||||
|
if (cx2 != null) {
|
||||||
|
cx2.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
super.tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setSessionTransacted() {
|
protected void setSessionTransacted() {
|
||||||
resourceProvider.setTransacted(false);
|
resourceProvider.setTransacted(false);
|
||||||
|
@ -90,7 +100,7 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest {
|
||||||
protected void reconnect() throws Exception {
|
protected void reconnect() throws Exception {
|
||||||
super.reconnect();
|
super.reconnect();
|
||||||
xares[0] = getXAResource(connection);
|
xares[0] = getXAResource(connection);
|
||||||
ManagedConnectionProxy cx2 = (ManagedConnectionProxy) connectionFactory.createConnection();
|
cx2 = (ManagedConnectionProxy) connectionFactory.createConnection();
|
||||||
xares[1] = getXAResource(cx2);
|
xares[1] = getXAResource(cx2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue