This commit is contained in:
gtully 2014-07-24 15:18:42 +01:00
parent fb569e3fbc
commit e1cd19e86e
4 changed files with 15 additions and 6 deletions

View File

@ -653,7 +653,7 @@ public class TransactionContext implements XAResource {
final FailoverTransport failoverTransport = this.connection.getTransport().narrow(FailoverTransport.class);
if (failoverTransport != null && !failoverTransport.isConnected()) {
// otherwise call will block on reconnect forfeting any app level periodic check
XAException xaException = new XAException("Failover transport not connected: " + this.getConnection().getTransport());
XAException xaException = new XAException("Failover transport not connected: " + this.getConnection());
xaException.errorCode = XAException.XAER_RMERR;
throw xaException;
}
@ -829,6 +829,7 @@ public class TransactionContext implements XAResource {
public String toString() {
return "TransactionContext{" +
"transactionId=" + transactionId +
",connection=" + connection +
'}';
}
}

View File

@ -399,4 +399,9 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi
return transactionContext;
}
@Override
public String toString() {
return "[" + super.toString() + "," + physicalConnection +"]";
}
}

View File

@ -352,12 +352,9 @@ public class ActiveMQResourceAdapter extends ActiveMQConnectionSupport implement
if (connection != null) {
try {
connection.close();
} catch (JMSException ignored) {
} finally {
setConnection(original);
}
} catch (JMSException ignored) {}
}
setConnection(original);
}
}};

View File

@ -132,6 +132,7 @@ public class LocalAndXATransaction implements XAResource, LocalTransaction {
public Xid[] recover(int arg0) throws XAException {
Xid[] answer = null;
LOG.trace("{} recover({})", new Object[]{this, arg0});
answer = transactionContext.recover(arg0);
LOG.trace("{} recover({}) = {}", new Object[]{this, arg0, answer});
return answer;
@ -163,4 +164,9 @@ public class LocalAndXATransaction implements XAResource, LocalTransaction {
transactionContext.cleanup();
inManagedTx = false;
}
@Override
public String toString() {
return "[" + super.toString() + "," + transactionContext + "]";
}
}