I am using jboss 3.2.1 with tomcat and I am trying to deploy an ear in exploded directory structure. I want to have my ear loaded in a separate classloader. So
I am putting jboss-app.xml in the ear META-INF file
with the following content
<jboss-app>
<loader-repository>myapp.com:loader=myapp.ear</loader-repository>
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</jboss-app>
When I start jboss I get the following warning message and when I run myapp, I see it is not loaded in a separate classloader.
15:20:47,401 WARN [DeploymentInfo] Only the root deployment can set the loader repository, ingoring config=LoaderRepositoryConfig(repositoryName: ispring.com:loader=ispring.ear, repositoryClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3, configParserClassName: null, repositoryConfig: null)
What else should I do to have my ear loaded by a separate classloader?
The problem is not inside jboss-app.xml but inside webapp's or ejb's the deployment descriptors: if you have an ear and not only a war or ejb yo hato to declare the loader-repository only into ear's deployment decriptor!