I have an EAR application contains multilple EJB's and single Resource Adaptor. My EJB depends on some JARs which are under lib directory.
Now the problem is that I have a JAR abc.jar which are present under my my.ear/lib directory as well as under my Resource Adaptor i.e. my.ear/plugin-ra.rar#abc.jar, both are same but I want my Resource Adaptor to use the one which is inside my my.ear/plugin-ra.rar instead of one under my.ear/lib as this JAR loads my plugin present under Resource Adaptor.
Is there anyway I can configure my RA to use delegate=false at class loading using Application Server specific deployment descriptors, as this behaivour differs from each Application Server. This is currently working fine on jBoss 4.2.3GA without any configurations but fails on Glassfish3.0.1, WebSphere7 and WebLogic10.3.3.
Your comments and help will be appreciated.
if you enable enable-global-access-to-classes to true in weblogic-ra.xml, all classes inside RAR will be loaded in a classloader which is parent of all ear appliactions; if set to false, all classes inside RAR by default will be loaded by a sub-classloader of ear.
jars in EAR\lib are always loaded by EAR's classloader.
Put same jar in multiple places is not good practice any way.
My suggestion is to re-arrange your ear/rar to always just keep one copy of each jar.