I did a small test to see what the classloader is for the MBean for 
jbosstestadapter.rar:


  | ObjectName oldName = new 
ObjectName("jboss.jca:name='jbosstestadapter.rar',service=RARDeployment");
  |             
  | ClassLoader loader = server.getClassLoaderFor(oldName);
  | System.out.println("ClassLoader is: " + loader);

The output I get is:

anonymous wrote : 09:46:56,789 INFO  [STDOUT] ClassLoader is: 
org.jboss.mx.loading.UnifiedClassLoa
  | [EMAIL PROTECTED] 
url=file:/C:/eclipse/workspace/jbossserver/bin/./server/default/tmp
  | /deploy/tmp53524jbosstestadapter.rar ,addedOrder=4}

So it does seem to be loading somewhere, but my other code can't see it when I get 
inside my unit test.

Hmmm. Here's another test:

ClassLoader parent1 = loader.getParent();
  | System.out.println("Parent1 is: " + parent1);
  | while (parent1 != null) {
  |     parent1 = parent1.getParent();
  |     System.out.println("Parent1 is: " + parent1);                   
  | }

I'm wonder. If I remember correctly (I'll do some research on this), a child 
classloader can see its parent's classes, but not vice versa. I bet I'm running into 
that. My JUnit class is the parent, initing the .rar in a child loader, which doesn't 
help my programmatic creation of the ManagedConnectionFactory MBean.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3842572#3842572

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3842572


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to