java - Is it possible to propagate a transaction through different EJB 3.1 and several database servers? -
the problem this, have 3 ejb, ejb_a have connection server database 1, ejb_b have connection server database 2 , third ejb_c responsible calling first two. when there error in ejb_a or ejb_b rollback done in ejb there error, on other ejb saved done, eventhough should propagate rollback 2 ejb. ejb_c: @stateless @localbean @transactionmanagement( transactionmanagementtype.bean ) public class ejb_c { private ejb_a ejba; private ejb_b ejbb; @postconstruct public void init(){ context context = null; try { context = new initialcontext(); this.ayudantesessionbean = (ayudantesessionbean) context.lookup("java:global/trans1/trans1dba/ejb_a"); this.ayudantesessionbean = (ayudantesessionbean) context.lookup("java:global/trans1/trans1dba/ejb_b"); } catch (namingexception ex) { logger.getlogger(orquestadorsessionbean.class.getname()).log(level.severe, null, ex); } } ...