Re: Help with java.rmi.server.codebase

Gregg Wonderly <[email protected]> Tue, 26 Dec 2006 18:29:13 -0600
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
Bob Scheifler wrote:
>> I'm trying to setup my RMI server so it can load some if the needed
>> classes off an http server rather than having to put them on the local
>> system.
>
>
> Local class loading does not look at the RMI codebase property; you
> can't accomplish what you want using that property.

Yes, this is the other important factor, thanks for jumping in Bob.  That
property is used by the default RMIClassLoaderSPI implementation.  It causes RMI
to annotate exported proxy definitions (via MarshalledObject) to carry with them
the information needed for remote users to download and use the proxy's required
classes.

What you are doing will require that you create a URL classloader pointing at
the classes that you want to be loaded remotely.  You will then need to set and
maintain that as the Thread context class loader for all execution paths that
you want those classes to be available from/in.

Gregg Wonderly

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html