-
1. Re: obtaining MBeanServerConnection - classloading issues
shelly.mcgowan Sep 30, 2008 12:47 PM (in response to akostadinov)Looks like we both encountered the same problem. I ran into this when implementing the change requested in JBASM-12. Initially planned to look up the Context.PROVIDER_URL to determine the URL to use for shutdown but chose an alternative due to this error. I took the easy way out but am interested to know if it is possible.
-
2. Re: obtaining MBeanServerConnection - classloading issues
akostadinov Oct 2, 2008 2:33 AM (in response to akostadinov)I found http://java.sun.com/products/jndi/tutorial/beyond/misc/classloader.html.
I will try with Thread.setContextClassLoader() although that could have unexpected side effects if different tasks set it -
3. Re: obtaining MBeanServerConnection - classloading issues
akostadinov Oct 2, 2008 3:12 AM (in response to akostadinov)I find somebody was in the same situation and resolved his problem that way
http://markmail.org/message/3n2fecjrxivl2yjo
Actually seems like apache-ant's junit task in 1.7.x is using the same and there are plans for more tasks to support it.
http://www.docjar.com/html/api/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java.html
I will need to dig deeper into it to see what would be the "correct" way for implementing it...[/url] -
4. Re: obtaining MBeanServerConnection - classloading issues
akostadinov Oct 5, 2008 10:26 AM (in response to akostadinov)They don't seem to be doing too much magic. Just set as a loader what loaded the JUnitTask and add additional path as specified by the user.
But I have another problem in jboss-test... Anyways things are now pretty clear. I'll start another thread in the internal testing forum once I do some testing.