• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI - Client Application

 
dk
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do u have any idea if i would like to create a server application invoke a client method in RMI?
can anybody show me some examples bcos i jus started programming using RMI.
Tanks in advance...
 
Harish Kashyap
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your application will consist of two-RMI Servers and two-RMI clients.
its simple
as you do in a simple RMI client-server application
in this case
both client & server will extend UnicastRemoteObject
i.e both will implement some Remote methods hence both will act like RMI Servers for clients.
and both will become clients for each other by invoking Remote Methods on each other.
so both are clients as well as servers.
its like C is a client , B & A are a server
C --------------------->B---------------------->A

here B is Server for C and Client for A
in your case A is C itself.
so write 2 RMI server programs.
& implement client code in both of them.
 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
how about creating an RMI server and first do some kind of login with the client. in this login procedure you pass a reference to the client to the server. then there is no need for to servers, two registrys.
would this work ?
karl
 
dk
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tanks guy for replying me...
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"dk"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing
the guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic