Re: Using an interface between two dl'ed applications

Gregg Wonderly <[email protected]> Mon, 19 Jan 2009 10:23:10 -0600
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Calum Shaw-Mackay wrote:
> The point that I'm making is that both 'B' and 'C' were created in 
> separate calls, and potentially separate classloaders, meaning that the 
> definition of the interface used by 'B' and that used by 'C' will be 
> marked as being different because the class is not sourced from a the 
> same single classloader when used/linked to by 'B' and 'C'
> 
> To be clear, this is not cross JVM as such - both B and C are in the 
> same JVM, but are deployed via separate remote calls into the JVM.... 
> this can be of course solved by placing the interface on the classpath 
> of the container, but this is not a desirable way for me to go

So it sounds like your invocation handler needs to reactivate the context class 
loader to be getClass().getClassLoader() so that any calls out of a particular 
dynamic proxy are exposing the correct class loader.

Gregg Wonderly

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]