[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - injection and classloader isolation

dberansky do-not-reply at jboss.com
Wed Dec 10 11:05:43 EST 2008


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195666#4195666

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195666



More information about the jboss-user mailing list