[jboss-user] [EJB 3.0] - Re: $Proxy200 error & Invalid (i.e. remote) invocation of lo

ezanih do-not-reply at jboss.com
Fri Jan 9 04:35:32 EST 2009


Itsme

You are absolutely, correctly right! With JBoss AS, and injecting the persistence unit into the EntityManager, you 

(1) don't even have to create an EntityManagerFactory. It's all done by the container. You just  inject the EntityManager with the @PersistenceContext annotation and all this should be done in the EJB3 not the client or calling servlet or calling jsp page.

(2) don't have to call em.getTransaction.begin(), em.getTransaction.commit() or em.getTransaction.rollback(). This is all handled auto by the container when the EJB3 is called.

This has certainly made programming much easier with less verbose code!

:-)

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

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



More information about the jboss-user mailing list