I have the following EAR structure which is deployed to WildFly 9.0.2
root.ear
|-ejb1.jar
|-ejb2.jar
|-lib/
|-libA.jar
|-libB.jar
The libA.jar and libB.jar both have the same class. I have no access to modify libB.jar and I need both the EJB modules to pick the class from libA.jar.
How to enforce this like we do with classpath by the ordering the jars as required?
take a look at https://docs.jboss.org/author/display/WFLY/Class+Loading+in+WildFly
you could probably do something like
<
resource-root
path
=
"libB.jar"
>
<
filter
>
<
exclude
path
=
"path/to/exclude"
/>
</
filter
>
</
resource-root
>