|
From: <jue...@we...> - 2004-09-02 17:17:30
|
I completely agree that we should not recommend mixing strategies, but = rather concentrate on making JtaTransactionManager work within EJB BMT = or web components in all cases. BTW, I've just noticed that the problem with resuming a rollback-only = transaction on WebLogic will hardly ever happen when driven by Spring's = JtaTransactionManager: Spring keeps the rollback-only flag in its own = TransactionStatus object, applying it at commit time. The JTA = UserTransaction will just receive a setRollbackOnly call when a = participating subtransaction completes with a rollback. For example, the following sequence will work with JtaTransactionManager = on WebLogic, provided that everything's driven by Spring demarcation = (because of the workflow outlined above): - outer transaction begin - outer transaction setRollbackOnly - inner transaction (REQUIRES_NEW) begin - inner transaction (REQUIRES_NEW) commit - outer transaction commit Just scenarios like the following won't work, because the participating = transaction (REQUIRED) will mark the JTA transaction as rollback-only, = creating the resume problem on WebLogic after the new transaction = (REQUIRES_NEW) has completed: - outer transaction begin - inner transaction 1 (REQUIRED) begin - inner transaction 1 (REQUIRED) setRollbackOnly - inner transaction 2 (REQUIRES_NEW) begin - inner transaction 2 (REQUIRES_NEW) commit - outer transaction commit Thus, as long as Spring's JtaTransactionManager drives all transactions = itself (which is the case with EJB BMT or web components), there's just = a need for using WebLogicJtaTransactionManager in very specific cases. = For many transaction suspension use cases, the standard = JtaTransactionManager will work too. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of tho...@tr... Sent: Thursday, September 02, 2004 5:30 PM To: spr...@li... Subject: Re: [Springframework-developer] JTA transaction suspension on WebSphere Yes, but just because it works in one instance does not make it a good = practice :) I only used it because Eugene's test case was set up that way. From EJB 2.1 spec - 17.3.4 Enterprise Beans Using Container-Managed = Transaction Demarcation: "The enterprise bean's business methods, message listener methods, or = ejbTimeout method must not attempt to obtain or use the = javax.transaction.UserTransaction interface." So I think it would be wise not to mix strategies - either use J2EE = BMT/Spring declarative transactions or J2EE CMT. That way we can stay withing the = J2EE spec. If I have time this weekend I'll try to test these scenario with BMT on = WLS 8.1 and 7.0. Thomas Quoting Colin Sampaleanu <col...@ex...>: > > eu wrote: > > > So, now it is unclear if it does work on WLS 8 in CMT scenario? > > It does, as per Thomas's confirmation... > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |