Re: code mobility

Mark Zaini <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <LISTSERV%[email protected]>
Thank you Gregg for the pointer about Reflection,I read about it ,
Can you give more details?...an example?
On the web I didn't find example about loading of remote classes( with
inheritance...)



On Wed, 20 Dec 2006 14:19:32 -0600, Gregg Wonderly <[email protected]>
wrote:

>Mark Zaini wrote:
>> I would use a classloader which can solve the hierarchy between two or
more
>> classes:
>> If the class A (local) extends the class B(this class could be
>> on a remote repository at the moment I'm doing my test with Apache)
>> I don't want ClassnotFoundException...
>> I would use the class A 's remote method without doing override but
>> solving the hierarchy.
>
>It's perfectly possible to do this, however Class A and its parent B,
must have
>a view of classloading hierarchy which allows the resolution of A to
cause B to
>be loaded.  This often means that a third class, C, has to be the one to
setup
>the classloading, and C must then load A through reflection (Class.forName
()),
>because otherwise, it's reference to A by name might force resolution at
the
>time C is loaded.
>
>You'll have to play with the design you intend to deploy, and see what
issues
>you encounter.  The moment of class resolution is a fuzzy line, and if
you end
>up on the wrong side of it, you'll get CNF exceptions that seem wrong, or
odd.
>
>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]

--------------------------------------------------------------------------
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.