[jboss-user] [JBoss Seam] - Re: access the entityManager in a converter (seam 2 beta)

dajevtic do-not-reply at jboss.com
Thu Jun 28 05:43:17 EDT 2007


I am not sure if this is the best way. It would probably be better to use the seam entity converter, but here goes:


  | 			InitialContext ctx = new InitialContext();
  | 			String jndiEntityManagerFactory = "factoryDefinedInComponentsXml";
  | 			EntityManagerFactory factory = (EntityManagerFactory) ctx
  | 					.lookup(jndiEntityManagerFactory);
  | 			EntityManager entityManager = factory.createEntityManager();
  | 

Hope, it helps!

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

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



More information about the jboss-user mailing list