This content has been marked as final. 
    
Show                 3 replies
    
- 
        1. Re: SMPC - entityManager doesn`t get autocreatedw17chm4n Dec 5, 2007 6:10 AM (in response to w17chm4n)Oh and questionCategoryManager code @Stateful @Scope(ScopeType.APPLICATION) @Name("questionCategoryManager") public class QuestionCategoryManagerBean implements QuestionCategoryManager { @Logger Log log; @In private EntityManager entityManager; public void addCategory(QuestionCategory category) { log.info("Persiting category ["+category.getCategoryName()+"]"); category.setCreated(new Date()); entityManager.persist(category); } public void removeCategory(QuestionCategory category) { log.info("Removing category ["+category.getCategoryName()+"]"); entityManager.remove(category); } public List<QuestionCategory> getAllQuestionCategories() { log.info("Reciving QuestionCategory list"); return entityManager.createQuery("from QuestionCategory qc order by qc.created").getResultList(); } @Destroy @Remove public void destroy() { } }
- 
        2. Re: SMPC - entityManager doesn`t get autocreatedshane.bryzak Dec 5, 2007 11:24 AM (in response to w17chm4n)It's not part of core, try this instead: <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/EntityManagerFactory"/> 
- 
        3. Re: SMPC - entityManager doesn`t get autocreatedw17chm4n Dec 6, 2007 2:34 AM (in response to w17chm4n)Thx ! It work`s now perfectly :] 
 
    