Bugs item #582198, was opened at 2002-07-16 12:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=582198&group_id=22866
Category: JBossTX Group: v3.0 Rabbit Hole Status: Open >Resolution: Accepted Priority: 5 Submitted By: Thomas P�schmann (thpoe) Assigned to: Ole Husgaard (sparre) Summary: UserTransaction#rollback() Initial Comment: I noticed that calling UserTransaction#rollback() does a) call JTA Synchronization#beforeCompletion (violates the JTA spec) b) not change the status of the transaction (it's still ACTIVE) c) does not force the TM to call END with TMFAIL (violates the XA specification) It's the current version from jboss.org, with standard config (built-in tx manager). Sorry if this is a re-post or already closed bug... ---------------------------------------------------------------------- >Comment By: Ole Husgaard (sparre) Date: 2002-07-18 16:50 Message: Logged In: YES user_id=175257 Ad b) I see no problem with changing the transaction service so that on rollback the state during the beforeCompletion() callout is Status.STATUS_MARKED_ROLLBACK. Ad a) If the above fixes this problem, we need not consider this any longer. Ad c) I am still reluctant to do resource.end(TMFAIL) during rollback. Reason is that this may cause some XA resources to think something is wrong (possibly closing and reopening external resources) when everything is just fine. ---------------------------------------------------------------------- Comment By: Thomas P�schmann (thpoe) Date: 2002-07-18 07:03 Message: Logged In: YES user_id=516835 - JBoss 3.0.0, with nothing else done than creating a database connection and creating a jndi.properties for my client to remotely connect to my server - if you fix b), then fixing a) would be obsolete JTA spec 1.0.1., page 42: "If TMFAIL is specified, the portion of work has failed. The resource manager may mark the transaction as rollback-only." - THE portion of work, that includes the transaction or the sub-transaction. However, the XA spec is a little bit more clear on this (I send you a private mail on that...) ---------------------------------------------------------------------- Comment By: Ole Husgaard (sparre) Date: 2002-07-16 18:37 Message: Logged In: YES user_id=175257 Please state which version of JBoss you are using. 3.0.0? 3.0.1? CVS Branch_3_0? CVS HEAD? Also there are a lot of different UT implementations. Which one are you using? The one for ejb clients in the same VM as server? The one for ejb clients in a different VM? Other? Ad a) JTA 1.0.1 specification is a bit unclear on this, but this is not a spec violation. Ad b) This looks like a bug. During the beforeCompletion() call is should still be ACTIVE, but before rollback() is called on the first XAResource, the state should go to ROLLING_BACK, and after all XAResources have been rolled back, the state goes to ROLLEDBACK. Ad c) Correct, end() is called with TMSUCCESS. The spec says that TMFAIL sould be used for when the portion of work has failed. However, the rollback() is not a failure, but an administrative decision made by your code, so I don't see this as a spec violation. I'm very interested in having this code conforming to JTA 1.0.1, so please cite relevant sections of the specification if you still think that this violates JTA. Best Regards, Ole Husgaard. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=582198&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
