This content has been marked as final. 
    
Show                 5 replies
    
- 
        1. Re: Access to EntityManager in authenticator?cavani Feb 1, 2007 1:38 PM (in response to dustismo)To use @In for EntityManager you have to set Seam managed Persistence: 
 http://docs.jboss.com/seam/1.1.5.GA/reference/en/html/persistence.html
- 
        2. Re: Access to EntityManager in authenticator?dilator Feb 1, 2007 1:38 PM (in response to dustismo)That should work, is your entity manager actually called 'entityManager' in components.xml / persistence.xml? 
- 
        3. Re: Access to EntityManager in authenticator?dustismo Feb 1, 2007 2:02 PM (in response to dustismo)Thanks much for the quick advice. 
 settingauto-create="true" 
 in components.xml<core:managed-persistence-context name="entityManager" auto-create="true" ....... 
 fixed the problem.
- 
        4. Re: Access to EntityManager in authenticator?gavin.king Feb 1, 2007 2:28 PM (in response to dustismo)@PersistenceContext only works in EJB3 components. 
 Do you have a Seam-managed persistence context named "entityManager" configured in components.xml?
- 
        5. Re: Access to EntityManager in authenticator?mariuszs Feb 1, 2007 3:17 PM (in response to dustismo)You can also use @Stateless bean (simply add this annotation) and @PersistanContext can work. You need also interface for this bean. 
 
     
     
     
    