Re: code mobility
Gregg Wonderly <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
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]