posted 22 years ago
Hello all,
I've not written a server before, and I'm wondering if this design constitutes a server as required by the project.
~~~~~~~~~~~
Remote mode
I have a class called Server, which when instantiated simply creates a LockManager object and a ConnectionFactory object and binds LockManager and ConnectionFactory to the RMIRegistry
A client contacts the RMIRegistry to request a Connection object from the ConnectionFactory
A Connection object implements a RemoteDataInterface and has a reference to the LockManager.
A Connection object provides remote access to the database.
LockManager tracks database locks from multiple clients
Once a client has a Connection object, it accesses the database (and the LockManager) via the Connection object.
~~~~~~~~~~~
Server, LockManager, ConnectionFactory and Connection are all separate classes. Server simply launches LockManager and ConnectionFactory, and they provide mechanisms for doing the rest (ie accessing the database, locking and unlocking records).
Am I missing something? Should I have my clients going through the Server to access the ConnectionFactory and LockManager? Or, is it ok for the clients to contact the ConnectionFactory and LockManager directly?
cheerio
Rowan