> Hi!

Hey, Rickard.

> Yes. We use java.rmi.MarshalledObject, which mimics RMI classloading
> semantics. It will use the context classloader or the 
> classloader of the
> caller (which in this case is the JNDI implementation so doesn't give
> much). Essentially you should be looking at making all 
> necessary classes
> available in the contextclassloader. Are you having problems 
> with this?

I'm not sure.  My remote interface is being loaded by an
AdaptiveClassLoader (which is what Tomcat uses to get classes from
WEB-INF/{classes,lib}).  It's parent is the context class loader which
has all of my JNDI entries.  However, for some reason JNDI is not using
that class loader.

Here's what I know:

1.  The class loader of the remote interface is an adaptive class loader
(which has all the classes).  It's parent is a sun.misc.Launcher...
loader (maybe it should be the thread context class loader?).

2.  The class loader of the class doing the work is the same as the
remote interface.

3.  The thread context class loader is the one that has my JNDI.

4.  The object looked up through JNDI has a class loader from
sun.rmi.server.LoaderHandler, whose parent loader is the same as the
context class loader for the current thread.

I don't know how to make the thread context class loader know directly
about those classes.  Any ideas?

Thanks.

Reply via email to