• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote Data (factory or just one instance?)

 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a RemoteData object which implents my RemoteDataInterface and extends UnicastRemoteObject (It also has a reference to the db and a reference to my LockManager).
Right now, in my server, I am just making one of these available via RMI to the clients.
Does anyone have an opinion of which would be better... the way I currently have it, or make a factory that is put in the rmi registry, and then make that factory give out new RemoteData objects to clients?
Also, when I just put the one RemoteData in the rmi registry, does that mean that all clients are going through that one object? I am wondering if this will mess up my locking since my LockManager uses a ref to the RemoteData as the client id in my locking hashtable.
Thanks in advance for any advice here.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or make a factory that is put in the rmi registry, and then make that factory give out new RemoteData objects to clients?

Yes you must make the factory.
Also, when I just put the one RemoteData in the rmi registry, does that mean that all clients are going through that one object?

Yes.
I am wondering if this will mess up my locking since my LockManager uses a ref to the RemoteData as the client id in my locking hashtable.

Yes it will mess it up.
Hope that helps
Mark
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!