Le 19 nov. 2017 13:58, "Yann Blazart" <yann.blaz...@bycode.fr> 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" <justoga...@gmail.com> 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 < > rmannibu...@gmail.com> > 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" <justoga...@gmail.com> 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 > thi...@dpaper.com.br >