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

  @TransactionManagement(TransactionManagementType.BEAN)

inject em

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

inject user transaction

  @Resource
  private UserTransaction userTransaction;

start / commit / rollback transaction on userTransaction object

      userTransaction.begin(); // etc

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090192#4090192

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090192
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to