[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: ClassLoader behaviour on remote clustering tests
clebert.suconic@jboss.com
do-not-reply at jboss.com
Wed Apr 9 10:19:38 EDT 2008
This is interesting:
If I changed ClassLoaderJMSWrapper to look on itself besides the delegate, everything works (even with the latest AOP):
public Class<?> loadClass(String name) throws ClassNotFoundException
| {
| try
| {
| if (name.endsWith("[]"))
| {
| name = name.substring(0, name.length() - 2);
|
| //The classloader of an array type is the classloader of it's element (if non primitive)
|
| Class cl = delegate.loadClass(name);
|
| Object arr = Array.newInstance(cl, 0);
|
| return arr.getClass();
| }
| else
| {
| return delegate.loadClass(name);
| }
| }
| catch (ClassNotFoundException e)
| {
| return super.loadClass(name);
| }
| }
|
Now I have a few question:
Is there any hacks from javassist involved on calling the classLoader (direct calls to internal methods)?
Can you check if you are aways using the correct classloader? This might turn a bug on ClassLoaderJMXWrapper only. We just need to double check.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142760#4142760
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142760
More information about the jboss-dev-forums
mailing list