6 Replies Latest reply on Oct 1, 2007 11:55 AM by Monkey Den

    Warning: do not use Seam managed pesistent context for BMT

    koen handekyn Newbie

      warning !!!

      just lost a lot of time with the following. When you want to do bean managed transactions, do NOT use a seam managed persistent context (injected with @In) but use a EJB3 container managed persistent context (injected with @PersistenceContext).

      BMT how to summary

      mark bean as BMT


      inject em

      // NOT !!! @In
      private EntityManager entityManager;

      inject user transaction

      private UserTransaction userTransaction;

      start / commit / rollback transaction on userTransaction object

      userTransaction.begin(); // etc