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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...