• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI newbie question

 
Mervin Chan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a seriously newbie question on RMI:

I am doing a JAVA factory simulation program.

In my factory world, there are three objs: Machines, Products and Store.
Basically,Machines create Products that are pushed into a Store.

My intention is to run Machines in one PC, and Store in another.
Machines has to communicate with Stores.

So, does that mean that both my Machine Object and Store Object has to be servers? Who has to be the client in this case?


I am confused.

thanks, and apologies if i got some of the jargon wrong..
 
Dhar Desai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From you description it seems like Machines depends on Stores. That is Machines calls methods on Stores. If that's the case, then Stores should be a remote object. The Machines object then would have to look up the RemoteStub from the rmi registry and use the stub to invoke remote methods.

If Stores also calls methods on Machines, then Machines has to be a remote object as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!