-
1. Re: InitialLdapContext use in MBean
adrian.brock Sep 25, 2002 10:20 AM (in response to lekkim)Which version of jboss are you using?
I don't know which classloader
VersionHelper12.loadClass() will use.
Try printing out:
VersionHelper12.class.getClassLoader()
and
Thread.currentThread().getContextClassLoader();
it is probably one of these.
Regards,
Adrian -
2. Re: InitialLdapContext use in MBean
lekkim Sep 25, 2002 12:45 PM (in response to lekkim)Thank you for replying. I'm running the JBoss 2.4.4 / Tomcat 3.2.3 bundle on SuSE Linux.
It appears that the VersionHelper12.class has package scope so printing it wont be possible... I'm under the impression that a class inherits the classloader from the thread instance it is running in, and I don't see why this class should override this.
What I tried also, was to do a simple Class.forName() construct with and without supplying a class loader as the third argument. The class loader I supplied was Thread.currentThread().getContextClassLoader. Both didn't produce errors...
Any other pieces of wisdom you can throw in ?
(I'm going to try using another factory class and see what happens).
lekkim -
3. Re: InitialLdapContext use in MBean
adrian.brock Sep 25, 2002 1:22 PM (in response to lekkim)Class.forName(String) loads from the classloader
of the calling class.
Your MBean is loaded through the MLet so you won't
see a problem.
I've got java 1.4 which includes the ldap stuff in
the jre so I can't really try this myself.
Regards,
Adrian -
4. Re: InitialLdapContext use in MBean
lekkim Sep 25, 2002 5:24 PM (in response to lekkim)Hmmm... You speak of MLET's as though I should consider them. From my point of view the MLETs are "just" loaded to bootstrap JBoss and to load all jars in lib/ext onto the JBoss classpath. What I can't understand is why the classes that comprise the MBean loads from a different classpath that the MBean it self.
By the way. I tested my MBean with the JBoss 2.4.8/Tomcat 4.0.10 bundle - same problems... :-(
lekkim -
5. Re: InitialLdapContext use in MBean
adrian.brock Sep 26, 2002 6:48 AM (in response to lekkim)I mentioned the MLet because that is what loads
your MBean so class.forName() will use.
This is probably not true for Sun's class.
I don't know why Sun's class isn't using the
context classloader or looking at the classpath.
I do know this will work with JBoss3.0 because of
the UnifiedClassLoader system.
Regards,
Adrian -
6. Re: InitialLdapContext use in MBean (closing thread)
lekkim Sep 27, 2002 5:06 AM (in response to lekkim)OK thank you.
I tried with JBoss 3.0 and it worked the first time. I'll escalate internally and ask that we wait to implement this feature untill we upgrade to JBoss 3.0.
lekkim