[jboss-user] [JBoss Seam] - getting EntityManager from within java?
dustismo
do-not-reply at jboss.com
Wed Mar 21 19:53:41 EDT 2007
Hi,
How do i get the EntityManager from within a java method (i.e. without using @In)?
I have tried:
| EntityManager manager = ((ManagedPersistenceContext)Contexts.getConversationContext().get("entityManager"))
| .getEntityManager();
|
Which works some of the time (I assume only when the current conv holds an 'entityManager' reference).
thanks
Dustin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030422#4030422
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030422
More information about the jboss-user
mailing list