1 Reply Latest reply on Feb 20, 2007 12:48 PM by blazetrail

    Resource injection into EJB gives "null" values in embeddabl

    blazetrail

      Has anyone tried resource injection of EntityManager in EJB-3.0_Embeddable_ALPHA_9 ?

      Injected value is null in embedded container, but same bean with persistence.xml in real JBoss 4.0.5GA injects correctly.

      Trying to resource inject SessionContext also returns null.

      I am using other injected resources like @EJB, deployment seems to understand, lookup and log these but I have not checked the values yet.

      e.g
      @Stateful
      public class MyBean implements IMyBean {
      @PersistenceContext
      private EntityManager em;
      @Resource
      protected SessionContext ctx;

      public void someMethod() { // em and ctx are null here
      }