posted 17 years ago
If both Client and Server are Remote objects -
That means they both have "Remote" interfaces - let's call them "Client" and "Server".
The actual implementations, let's call "ClientImpl" and "ServerImpl".
One of the methods on the "Server" should be something like -
When ClientImpl gets a reference to Server (through Naming.lookup()) it can them call register() and pass a reference to itself in:
Then, inside ServerImpl, the register() method will receive the stub to "ClientImpl" - hidden behind a "Client" remote interface - and can save a reference to it...
assuming the "Client" interface has the following method -
Later - the ServerImpl can use these references to make calls to all the clients - something like -
[ May 03, 2006: Message edited by: Nathan Pruett ]
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.