• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rmi Call Back Issue!!!

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written Rmi Server and Client , and need to cordiante in Both way, that is Client have to respond back to server in order to continue.But problem is that when Client have to respond back to Server, then client become server and server become client.Every thing is Ok here, but problem rises that, isn't there is any way that we dont have to start Rmiregistry on Both side?But only on single side, or not even any side but there is some other substitute for Look up,assmue i have bunch of ports avaialble.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is Jini. Jini supports a ServiceRegistrar that can manage callbacks on a system that both client and server use to find each other.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is possible to stay within the realm of RMI and not run another rmiregisty on the client and still have callbacks. For example, let's say that we have an RMI server bound to rmiregistry which increments every second and we want it to send a callback to any client which contacts it every time it increments. The Interface for the Server could be:

RemoteEventListener is also an RMI interface, which could be defined as:

Now a client could register a callback with the server by running through a sequence like this:

As long as ClientCallback is a class which extends UnicastRemoteObject and implements RemoteEventListener. The difficult part of course is making sure the client and the server have access to the right stubs and if the client program is running behind a firewall the server will not be able to make the callbacks.
I hope this helps, I know it's a rather hasty explanation, but hopefully it's enough to get you started.
Chris
[ December 30, 2002: Message edited by: Chris De Vries ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic