0 Replies Latest reply on Oct 19, 2005 5:37 PM by Rene Felder

    2 server xa transaction propagation within payload

    Rene Felder Newbie

      We want to have a xa transaction (distributed 2 phase commit transaction) accross two JBoss Server Instances. Server A stores some data in database 1, Server B stores some data in database 2. If one of both fail, we want the transaction to be rolled back.

      We are using JBoss 4.0.3 in the default configuration with Oracle 9.2.x. The datasource is configured as XA datasource using class oracle.jdbc.xa.client.OracleXADataSource within the oracle jdbc thin driver 10g.

      Both Oracle instances are configured as XA Instances using the initjvm.sql and initxa.sql.

      EJB1 on Server A calls EJB2 on Server B. Both EJB's are container managed using 'Requires' as transaction demarcation. Although EJB1 and EJB2 should share one transaction EJB2 doesn't roll back the transaction after EJB1 throws a RuntimeException.

      After digging deeper into JBoss we found out, that the transaction in EJB1 is not put into the payload or as_is_payload, instead it is put into the transient_payload attribute of the invocation that is not propagated to JBoss Instance B.

      Does JBoss not support the propagation of transactions accross instances? Why is the transaction put into the transient_payload? Do we have to write a custom interceptor to support distributed transactions?

      Thx Rene