[jboss-user] [JBoss Seam] - Re: event org.jboss.seam.preDestroyContext.SESSION and no tr

rmemoria do-not-reply at jboss.com
Fri Mar 2 18:33:36 EST 2007


Actually I?ve worked around it.

I have implemented it as a Java Bean with an EntityManager being injected.

@In EntityManager entityManager

I changed it to a Stateless Session Bean and switched the EntityManager injection to

@PersistenceContext EntityManager entityManager;

Now it?s working.

Maybe the entityManager injected wasn't commited because it was out of an HTTP request.

So my conclusion is that to use an EntityManager in the event preDestroyContext.SESSION, we HAVE to implement it as a Session Bean and use a @PersistenceContext annotation to inject it. Right?

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024784



More information about the jboss-user mailing list