JBoss Community

Re: More on BaseClassLoader conflict with Instrumentation....

created by Ted Hulick in JBoss Microcontainer - View the full discussion

First, I really appreciate your help...

 

Ok - I don't control the WAR file...essentially, our product montiors JBoss app server...the WAR in this case was written by QA...and they included jms.jar in their deployment.  So, you are saying that if they DID NOT include it - it would have found the one I attached to the base system classloader?

And you are saying that by default the WAR will indeed load it's jms.jar and NOT look downstream to my jms.jar?  Is there a way to override this behavior just for that 1 jar?  Maybe via a property that was set?  Can it be done programmatically?  We can't ask the customer to change

their deployments.

 

On the jboss-classloading.xml to parent first...would this override the WAR file self-first?  Again, can something be done via property or programmatically so customers don't have to alter their deployment.

 

Essentially, I'm just added some jars to the classpath using the addURL (and change protection) on the system classloader and then referring

to those classes in instrumentation....because they make reference to jms classes - I have to make sure jms.jar is in the system classloader

path as well.   When anything else in the app loader loads jms.jar (which is only interfaces anyhow) classes from their own loader and now

delegate downstream to mine - then Class Cast issues occur as of course, a class instance in 2 different loaders is not considered to be

the same class.

 

Again - any help/suggestions is appreciated....

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community