[jboss-user] [JBoss Seam] - SMPC:@In EntityManager or @PersistenceContext ?
dkane
do-not-reply at jboss.com
Thu Oct 18 03:32:34 EDT 2007
Dear colleagues,
I've read a lot about advantages of SMPC in this forum.
In documentation, the recommended way to configure and use SMPC is :
components.xml :
<core:managed-persistence-context name="bookingDatabase"
| auto-create="true"
| persistence-unit-jndi-name="java:/EntityManagerFactories/bookingData"/>
Java code :
@In EntityManager bookingDatabase;
The best way of learning is examples , and I am looking into Seam 2.0 examples directory then.
Almost all examples contains the corresponding configuration tag in components.xml.
However, entityManager is being injected with @PersistenceContext or
@PersistenceContext(TYPE=EXTENDED) in the vast majority of Java code. The canonical examples Booking and DVDStore does that too.
Is SMPC actually used in Seam examples ? If not (BTW, why ?), where can I see sources of complete SMPC application ?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096391#4096391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096391
More information about the jboss-user
mailing list