I have an ear which contains a war. Jars are in the ear lib directory.
I need to override a class from a jar and I wrote it in the war.
But when I deploy the ear, the classloader takes the class from the jar and not from the war.
I set this configuration in the jboss-web.xml in the war. I believe it forces the classloader to take classes from war before jar but it doesn't work.
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.example:archive=unique-archive-name
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
How can I force the jboss classloader to take classes from war before the jar ?
Thanks.