1 Reply Latest reply on Aug 12, 2009 5:52 AM by Nikolay Elenkov

    injecting the TransactionManager in Seam

    Arbi Sookazian Master

      If I was able to inject the javax.transaction.TransactionManager interface in a Seam component, for example a session bean using BMT as follows:

      public class HelloBean implements HelloBeanLocal {...}

      I would be able to do:

      private TransactionManager txMgr;
      private UserTransaction utx;
      private XAResource xaRes1;
      private XAResource xaRes2;
      public void foo() {
         Transaction tx = txMgr.getTransaction();

      to manually enlist resources into my distributed tx.

      Is it possible to inject TransactionManager in a Seam component using @In?  And if not, is it possible to do it using JNDI lookup?

      How can I check to see what XAResources have been enlisted in a distributed tx in this API?