• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about RMI

 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Just have a quick question about RMI, that is : does each request from client get an instance of remote object in server or all client talk to one instance?
Thanks in advance
Sam
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sam Stackly:
Hi Guys,
Just have a quick question about RMI, that is : does each request from client get an instance of remote object in server or all client talk to one instance?
Thanks in advance
Sam


I have each client getting its own instance. That way I can use that client as the id for my locking.
 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so you generate an instance for each client, how about RMI? what's RMI doing if you don't do that, I mean what's the nature of RMI? single instance and pass that instance to all request or RMI create an instance of remote object per request?
Thanks
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sam Stackly:
so you generate an instance for each client, how about RMI? what's RMI doing if you don't do that, I mean what's the nature of RMI? single instance and pass that instance to all request or RMI create an instance of remote object per request?
Thanks

I guess I wasn't too clear. I have one instance of a remote data factory that I bind for rmi. That factory will then give out remote data objects, one per client, that I use to get my remote data and that my LockManager uses as the clientId for locking/unlocking records.
Hope that helps.
 
Amit Kr Kumar
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nate
This means that in your design, the lock() and unlock() methods at Data are empty and all locking is perfomred by the LockManager.
What did u right for javadoc of lock and unlock in Data. How did you defend it in your design choice

Amit
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Amit Kr Kumar:
Hi Nate
This means that in your design, the lock() and unlock() methods at Data are empty and all locking is perfomred by the LockManager.
What did u right for javadoc of lock and unlock in Data. How did you defend it in your design choice

Amit


Yeah they are empty in my data class. Haven't written my doc yet thought, sorry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic