0 Replies Latest reply on Jul 21, 2005 12:05 PM by umeshs79

    java2ParentDelegation and class loading isolation for EJB

    umeshs79 Newbie

      Hi

      What is the functionality of java2ParentDelegation in below jboss-app.xml.

      <?xml version="1.0"?>
      <jboss-app>
       <loader-repository>
       coa.akuratus.com:loader=coA.ear
       <loader-repository-config>
       java2ParentDelegation=false
       </loader-repository-config>
       </loader-repository>
      
      </jboss-app>
      


      I need class loading isolation for log4j in my ear file which contains 1 war and 1 ejb jar file.

      Structure is as below

      myapp.ear
      ---META-INF
      ------application.xml
      ------jboss-app.xml
      ---myapp.war
      ---mymdb.jar

      now if i set java2ParentDelegation to false my EJB is not get loaded it throws follwoing exception


      2005-07-20 17:36:25,140 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
      Bean : MyMDB
      Section: 15.7.4
      Warning: The message driven bean must declare one onMessage() method.

      2005-07-20 17:36:25,140 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2005-07-20 17:36:25,140 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      2005-07-20 17:36:25,140 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2005-07-20 17:36:25,140 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/jboss/jboss-4.0.2/server/default/deploy/myapp.ear/mymdb.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)


      if i set java2ParentDelegation to true my EJB get loaded but there is no isloation the jboss logging configuration is overridden and all jboss logging is done my own logging file.

      Can you please help me how to set class loading isolation for ear which cnotains ejb and war files and how we configure log4j for EJB.

      Thanks & Regards,
      Umesh