Forums Register Login

Remote Data (factory or just one instance?)

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
 

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
Get off me! Here, read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 740 times.
Similar Threads
Please help me feel confident with my design ...
Overall Architecture
Is this Mechanism for locking acceptable
Locking Mechanism. Please help Max, Peter, Eugene,Mark
Lock Manager implementation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:12:30.