[jboss-user] [JBoss Seam] - Re: @In or @PersistenceContext for EntityManager?

Kruno do-not-reply at jboss.com
Mon Apr 9 06:36:50 EDT 2007


If you are using @In then you need to configure JPA http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/persistence.html#d0e5419
It means that seam will manage your EntityManager and you will just inject it.
Benefit of that is that you actualy use one EntityManager in side conversation, it is a great thing if you need to span one "hiberante session" between many actionBeans beacuse you than you do not have to merge things in side your context when you whant to persist them and so on it is truly session per conversation pattern, great thing I love it.
On the other hand if you use @PersistenceContext than it is EJB stuff and and EntityManager is unique for on ActionBean only.
I was confused about that to maybe this van help also 
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106004

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

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



More information about the jboss-user mailing list