Author: clebert.suconic(a)jboss.com
Date: 2009-11-23 16:07:39 -0500 (Mon, 23 Nov 2009)
New Revision: 8384
Modified:
branches/ClebertCallback/src/main/org/hornetq/core/transaction/impl/TransactionImpl.java
branches/ClebertCallback/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java
Log:
Fixing onePhase XA Commit
Modified:
branches/ClebertCallback/src/main/org/hornetq/core/transaction/impl/TransactionImpl.java
===================================================================
---
branches/ClebertCallback/src/main/org/hornetq/core/transaction/impl/TransactionImpl.java 2009-11-23
20:32:47 UTC (rev 8383)
+++
branches/ClebertCallback/src/main/org/hornetq/core/transaction/impl/TransactionImpl.java 2009-11-23
21:07:39 UTC (rev 8384)
@@ -203,9 +203,9 @@
}
}
- if (xid != null && !onePhase)
+ if (xid != null)
{
- if (state != State.PREPARED)
+ if (onePhase && state != State.ACTIVE || !onePhase && state
!= State.PREPARED)
{
throw new IllegalStateException("Transaction is in invalid state
" + state);
}
Modified:
branches/ClebertCallback/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java
===================================================================
---
branches/ClebertCallback/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java 2009-11-23
20:32:47 UTC (rev 8383)
+++
branches/ClebertCallback/tests/src/org/hornetq/tests/integration/largemessage/LargeMessageTestBase.java 2009-11-23
21:07:39 UTC (rev 8384)
@@ -237,7 +237,7 @@
producer = session.createProducer(ADDRESS);
- session.commit(xid, true);
+ session.commit(xid, false);
xid = newXID();
session.start(xid, XAResource.TMNOFLAGS);
}
Show replies by date