[jboss-user] [JBoss Seam] - Re: SMPC and explicit transactions
monkeyden
do-not-reply at jboss.com
Wed Sep 19 15:45:29 EDT 2007
For posterity sake....
In my EJB I just injected the SessionContext and the EM:
@Resource
| SessionContext ejbContext;
| @In
| private EntityManager em;
And had the EM join the transaction:
UserTransaction txn = ejbContext.getUserTransaction( );
| txn.begin();
| em.joinTransaction();
| //do something
| txn.commit();
Example taken from Bill's great book
http://www.oreilly.com/catalog/entjbeans5/
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086304#4086304
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086304
More information about the jboss-user
mailing list