posted 22 years ago
Hi, ranchers:
I have trouble to understand Connection Object some people talked about in earlier posts. I have designed the following to track client ID to do lock/unlock, but please clear any thing that does not make sense and modify my design to make things clearer for me. Thanks.
In order to track Client ID, we have to create one connection object for one client. So, I need to bind my ConnectionFactory (extends UnicastRemoteObject) to RMI. I have LocalDataAccess for local mode and RemoteDataAccess (extends UnicastRemoteObject and implements DataInterface) for remote mode. DataAccessFactory will use getConnection method in ConnectionFactory to get a connection for remote clients, and it also handles local client
accesses.
LockManager will be defined in a separate class in server package (since only remote accesses need them), record number and reference to RemoteDataAccess.
reference will be passed to lock/unlock methods.
I have many doubts about this design, please clarify it for me:
(1) My design with two factories make sense?
(2)Where is the best place to put lock manager? In server package, or in Data class?
[ June 12, 2002: Message edited by: Holmes Wong ]