[jboss-user] [Persistence] - Re: Simple JPA question

2009-09-28 Thread juicebox
I think that's because you're looking up the remote interface of userEao. Based on my experience, every single invocation to a remote interface (despite the target session bean is in the same environment) creates a new transaction/entitymanager, so the behavior you described above makes sense.

[jboss-user] [Persistence] - Current EntityManager

2009-09-27 Thread juicebox
Hi guys, I was wondering if there is any way to look up via JNDI or any other mechanism the current entity manager, exactly like the annotation @PersistentContext does. Since my objects that depend on the EntityManager are not managed, I don't see any other option but pulling them from JNDI.