marc fleury wrote:
>
> hmmmm the "recent" changes are with the Ole timeout, it is probably minor
> problems. We need to go ahead with the binary and we will integrate the
> Minerva stuff with the new JMX RI down the road.
The problem Aaron found was bad, but is fixed now.
The patch below fixes two more things:
1) Incorrect behaviour when a transaction in COMMITTING state
times out.
2) A problem with entity beans if the transaction is rolled
back. This problem was not seen before, as the afterCompletion()
methods were not called on rollback. I do not know what the right
thing to do is in this case, so I've commented away any rollback
handling in this method so it works like before.
Probably some heuristic exceptions need to be caught in various
places on commit.
Please beware of the warning:
TxCapsule: Violating JTA by adding synchronization to a transaction marked for
rollback.
It means that a synchronization was registered after the transaction
was marked for rollback, which is illegal according to JTA.
I'll allow it for now (with a warning), so that no new bugs will be
introduced by not allowing it.
Best Regards,
Ole Husgaard.
-----------------------------------------------------------
diff -ur
jboss.cvs/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java
jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java
--- jboss.cvs/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java
Fri Aug 25 19:51:37 2000
+++ jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java Fri
+Sep 8 21:08:10 2000
@@ -294,17 +294,17 @@
if (status == Status.STATUS_ROLLEDBACK)
{
- try
- {
-
- ctx.setId(null);
- ctx.setTransaction(null);
- container.getInstanceCache().remove(ctx.getId());
- container.getInstancePool().free(ctx); // TODO: should this be done?
still valid instance?
- } catch (Exception e)
- {
- // Ignore
- }
+// try
+// {
+//
+// ctx.setId(null);
+// ctx.setTransaction(null);
+// container.getInstanceCache().remove(ctx.getId());
+// container.getInstancePool().free(ctx); // TODO: should this be done?
+still valid instance?
+// } catch (Exception e)
+// {
+// // Ignore
+// }
} else
{
diff -ur jboss.cvs/src/main/org/jboss/tm/TxCapsule.java
jboss/src/main/org/jboss/tm/TxCapsule.java
--- jboss.cvs/src/main/org/jboss/tm/TxCapsule.java Fri Sep 8 22:42:04 2000
+++ jboss/src/main/org/jboss/tm/TxCapsule.java Fri Sep 8 21:06:58 2000
@@ -37,7 +37,6 @@
* TxCapsule holds all the information relevant to a transaction.
* Callbacks and synchronizations are held here.
*
- * TODO: Implement timeouts.
* TODO: Implement persistent storage and recovery.
*
* @see TxManager
@@ -126,11 +125,9 @@
// We are in the second commit phase, and have decided
// to commit, but now we get a timeout and should rollback.
// So we end up with a mixed decision.
- suspendedResourcesDone();
- rollbackResources();
- doAfterCompletion();
gotHeuristic(null, XAException.XA_HEURMIX);
- return;
+ status = Status.STATUS_MARKED_ROLLBACK;
+ return; // commit will fail
case Status.STATUS_PREPARED:
// This is bad: