0 Replies Latest reply on Dec 10, 2008 11:05 AM by dberansky

    injection and classloader isolation

    dberansky

      Hi

      Could anyone point me in the right direction for more information about this issue or ideas on how to debug it?

      I have a bean:

      @Stateless
      @PersistenceContext(name="PolicyPersistenceUnit", unitName="PolicyPersistenceUnit")
      public class FundingServiceBean implements FundingServiceRemote {
       @PersistenceUnit(unitName = "PolicyPersistenceUnit")
       private EntityManagerFactory emf;
      
       // ...
      
       public PolicyFundingInfo getPolicyFundingInfo(String producerCode,
       String chkControlId,
       String arControlId,
       int certmainseqno) {
       EntityManager em = emf.createEntityManager();
       //...
       }
      }
      

      With no classloader isolation, the injection works just fine and when getPolicyFundingInfo() is called, "emf" instance variable is set.

      However, when I add jboss-app.xml with

      <loader-repository>
       PolicyServiceApp:archive=policyService-1.2.ear
       </loader-repository>
      

      "emf" no longer gets injected.

      Any thoughts why?


      Thanks
      Dmitry