Yep, this is not a spec feature (10.6, this is optional and unspecified in term of protocol).
Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn 2017-11-20 12:47 GMT+01:00 Yann Blazart <[email protected]>: > Well, I just read again ejb 3.2 spec, > > At 10.6.1.1, of what I understand, context propagation must be. > > ??? > > Le 19 nov. 2017 9:00 PM, "David Jencks" <[email protected]> a écrit : > >> I’m not sure I understand what Romain is saying so I will try to explain >> in my own words. >> >> There are 2 things people generally mean when they talk about XA or >> two-phase transaction support. >> >> 1. One server with more than one transactional resource, typically >> databases and messaging. A transaction is started on this one server, >> “inside” the transaction various DBs and messaging are accessed, and the >> transaction is ended. The server “propagates” the transaction to the DBs >> etc and uses 2-phase commit to ensure consistent results across resources. >> EJB servers have to support this (although they are not required to support >> automatic recovery from failure) and Tomee supports this. >> >> 2. More than one server, where a transaction is started on one server and >> a remote ejb call to another server requires propagating the transaction to >> that second server. Supporting this is optional, for good reason. I have >> never encountered a situation with non-fossilized code where this is a >> remotely plausible architectural choice. Put all the ejbs on the same >> server and run multiple copies of the same server. Tomee does not support >> this. >> >> Hope this reduces rather than adds to confusion :-) >> >> David Jencks >> >> >> > On Nov 19, 2017, at 6:13 AM, Romain Manni-Bucau <[email protected]> >> wrote: >> > >> > Le 19 nov. 2017 13:58, "Yann Blazart" <[email protected]> a écrit : >> > >> > Wait Romain. >> > >> > You mean remote ejb TX do not work with tomee ??? >> > >> > >> > Not really, i meant with most servers "by design". Propagation is not >> > supposed to be done through remote calls. >> > >> > >> > That is a big problem >> > >> > Le 19 nov. 2017 1:53 PM, "Thiago Rodrigues" <[email protected]> a >> écrit : >> > >> >> Hi >> >> Thans for the quick response! >> >> >> >> If i remove the MANDATORY from EJB2 everything works fine, but EJB2 >> > perform >> >> inserts (with XA Oracle Datasource), but if an exception are thrown in >> >> EJB1(after the EJB2 response) all the operations made in ejb1 are >> >> rolledback but the data inserted by ejb2 are commited (probably because >> >> there is no transaction propagation from ejb1 to ejb2 and a new >> > transaction >> >> are created). I made this work in other AS such wildlfy and wl... but i >> >> would really like to made this work in tomee. >> >> >> >> On Sun, Nov 19, 2017 at 10:33 AM, Romain Manni-Bucau < >> >> [email protected]> >> >> wrote: >> >> >> >>> Hi >> >>> >> >>> Transactions are local until you use a XA system. EJB doesnt handle >> that >> >> in >> >>> tomee bit if the ejb2 call throws an exception and propagates it in >> ejb1 >> >>> then a rollback will be done in both systems. >> >>> >> >>> >> >>> Le 19 nov. 2017 13:25, "Thiago Rodrigues" <[email protected]> a >> >> écrit : >> >>> >> >>> Hi, I am testing remote server Transaction Context Propagation. >> >>> >> >>> My application is like that and Tomee server version is 1.7.1 >> >>> >> >>> call >> >>> Server A (EJB 1) ========> Server B (EJB 2) >> >>> | | >> >>> | | >> >>> | | >> >>> DB 1 DB 2 >> >>> >> >>> EJB 1 is CMT and @TransactionAttribute(TransactionAttributeType >> >>> .REQUIRES_NEW) >> >>> EJB 2 is CMT and @TransactionAttribute(TransactionAttributeType. >> >> MANDATORY) >> >>> >> >>> I want to execute EJB 1 which works with DB1, then calls EJB 2 which >> >> works >> >>> with DB2 >> >>> in a single global transaction. >> >>> >> >>> when EJB 1 calls EJB 2 in remote server, It throws >> >>> TransactionRequiredLocalException Exception. >> >>> How to propagate transaction context to the remote server? >> >>> >> >> >> >> >> >> >> >> -- >> >> Atenciosamente, >> >> Thiago Rodrigues >> >> [email protected] >> >> >> >>
