JBoss Community

Re: JBoss-classloading.xml in EAR /EJB

created by Prav Ford in JBoss Microcontainer - View the full discussion

Hi  Ales,

I checked  org.jboss.deployers.plugins.classloading.AbstractClassLoaderDescribeDeployer.

 

if (deployment.isTopLevelClassLoader() == false)
{
     if (deployment.getParentDomain() == null) {
            deployment.setDomain(unitName);
            log.debugf("Will use synthetic domain for classloader of subdeployment: %1s", unitName);
     }else{
             log.debugf("Will create top level classloader for subdeployment: %1s", unitName);
     }
  }

 

If an EJB (with jboss-classloading.xml) is bundled within the EAR file , there is a need to specify just the parent-domain and not the domain.

 

<classloading xmlns="urn:jboss:classloading:1.0" parent-domain="DefaultDomain"
    export-all="NON_EMPTY" import-all="true" excluded="META-INF">
    <capabilities>
        <package name="com.ejb1.interface" />
    </capabilities>
</classloading>

 

That  solved my EAR usecase.

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community