1 Reply Latest reply on Feb 15, 2006 11:37 AM by rorschach

    EntityManager not getting injected

    rorschach

      I'm working with version 4.03SP1.

      I have a stateful session bean

      @Stateful
      public class ActivityManager implements Activity,Serializable {
      
       @PersistenceContext(type=EXTENDED,unitName="em")
       private EntityManager em;
      
      ...
      
      


      My persistence.xml
      <entity-manager>
      
       <name>em</name>
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/MSSQLAppDSInterop</jta-data-source>
      
       <class>com.xpel.hibernate.UserAccount</class>
      
       <properties>
       <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
       <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
      
       </properties>
      
      </entity-manager>
      


      When any methods on the bean are called, the EntityManager "em" resolves to a null value. I have a similiar project where this works flawlessly using the same libraries and app-server instance.

      Suggestions?