AMQ-3022 - Reverting changes for transaction suspend/resume due to broken tests

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1034430 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bruce Snyder 2010-11-12 15:39:37 +00:00
parent 40790f0e45
commit c9c6e62a60
1 changed files with 20 additions and 25 deletions

View File

@ -164,7 +164,7 @@ public class TransactionContext implements XAResource {
} catch (Throwable e) { } catch (Throwable e) {
throw JMSExceptionSupport.create(e); throw JMSExceptionSupport.create(e);
} finally { } finally {
synchronizations = null; synchronizations = null;
} }
} }
@ -334,17 +334,12 @@ public class TransactionContext implements XAResource {
throw new XAException(XAException.XAER_PROTO); throw new XAException(XAException.XAER_PROTO);
} }
String txSuspendResumeNotSupportMsg = "The suspend/resume of a transaction " // if ((flags & TMJOIN) == TMJOIN) {
+ "is not supported. Instead it is recommended that a new JMS session be created.";
if ((flags & TMJOIN) == TMJOIN) {
throw new XAException(txSuspendResumeNotSupportMsg);
// TODO: verify that the server has seen the xid // TODO: verify that the server has seen the xid
} // // }
if ((flags & TMRESUME) == TMRESUME) { // if ((flags & TMJOIN) == TMRESUME) {
throw new XAException(txSuspendResumeNotSupportMsg); // // TODO: verify that the xid was suspended.
// TODO: verify that the xid was suspended. // }
}
// associate // associate
synchronizations = null; synchronizations = null;
@ -705,20 +700,20 @@ public class TransactionContext implements XAResource {
* @return the response * @return the response
*/ */
private Response syncSendPacketWithInterruptionHandling(Command command) throws JMSException { private Response syncSendPacketWithInterruptionHandling(Command command) throws JMSException {
try { try {
return this.connection.syncSendPacket(command); return this.connection.syncSendPacket(command);
} catch (JMSException e) { } catch (JMSException e) {
if (e.getLinkedException() instanceof InterruptedIOException) { if (e.getLinkedException() instanceof InterruptedIOException) {
try { try {
Thread.interrupted(); Thread.interrupted();
return this.connection.syncSendPacket(command); return this.connection.syncSendPacket(command);
} finally { } finally {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
} }
throw e; throw e;
} }
} }
/** /**