[jboss-user] [JBoss Seam] - Re: looking for non-EJB SEAM example...

christian.bauer@jboss.com do-not-reply at jboss.com
Tue Apr 10 12:09:19 EDT 2007


Let Seam start the persistence unit, this will scan for META-INF/persistence.xml and deploy the "wiki" persistence unit if you put it in components.xml:


  |     <core:managed-persistence-context name="entityManager"
  |                                       auto-create="true"
  |                                       entity-manager-factory="#{wikiEntityManagerFactory}">
  |     </core:managed-persistence-context>
  | 
  |     <core:entity-manager-factory name="wikiEntityManagerFactory" persistence-unit-name="wiki"/>
  | 
  | 

Now use @In entityManager to get a Seam-managed persistence context that is automatically scoped to the conversation. You also want to use the TransactionalSeamPhaseListener in your faces-config.xml with that.


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

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



More information about the jboss-user mailing list