The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Java RMI implementations

Posted by Matt Gerrans on December 15, 2001 at 2:32 AM

> I'm working on developing a client/server application based on Java RMI. The only success that I've had in getting classes to compile/run correctly is to 1) Create an interface that extends java.rmi.Remote and make sure that every method on that interface throws remote exception. 2) Create a class which extends java.rmi.server.UnicastRemoteObject and implements my extension of the Remote interface.

> Needless to say, this is very restrictive from the point of view of class or interface inheritance, and I'd be surprised if there wasn't some other means of structuring my classes and interfaces, I just can't manage to figure out what it is.

> Anyone have ideas?

    Two comments:
  1. Only the classes that are involved in the RMI need the requirements you speak of; maybe you can implement things on both sides of RMI that are not a part of it, but used by it. However, I don't know the specifics and in your case this is not feasible and will only make things complicated...
  2. Maybe Jini would be a possibility for you, as it raises the level of abstraction from the network; that is, the objects are not so tightly tied to mechanism as they are with RMI. You can find lots more Jini information on Artima, of course.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us