I am trying to use jboss 4.0.4CR2 with the ejb3 option but at the moment when I try to use an EntityManager from within my session bean the entity manager is always null.
I have a stateless session bean where I load the entity manager: | @Stateless | public class CategorySessionBean implements CategoryView { | @PersistenceContext(unitName = "inventPU") | protected EntityManager manager; | | ... | public load(){ | //HERE THE manager is NULL | Query q = manager.createQuery("FROM Category"); | } | ... | } | I am deploying the application in an ear with the following structure: invent.ear | ...|-META-INF | ...|-META-INF|-application.xml | ...|-invent.par | ...|-invent.war | application.xml: | <application> | <display-name>invent</display-name> | <module> | <web> | <web-uri>invent.war</web-uri> | <context-root>/invent</context-root> | </web> | </module> | <module> | <ejb>invent.par</ejb> | </module> | </application> | invent.par: | ...|-META-INF | ...|-META-INF|-persistence.xml | ...|-gr (the entity and session beans) | persistence.xml | <?xml version="1.0" encoding="UTF-8"?> | <persistence> | <persistence-unit name="inventPU"> | <description> AEGEK invent pesrsistent unit</description> | <jta-data-source>java:/inventDS</jta-data-source> | <properties> | <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/> | <property name="hibernate.hbm2ddl.auto" value="create"/> | </properties> | </persistence-unit> | </persistence> | invent.war: (jsp and other web related stuff) HELP! Thanx ... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936858#3936858 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936858 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user