Seems to me that implementing the client-server architecture using RMI renders the synchronization of various Data methods useless, because each instance of the servant will be synchonizing on it's own code. That's if you create a new instance for each call. Would the way around this be to create the server as a "Singleton" design and simply hand back references to the single instance with each call? Thoughts?
posted 16 years ago
Douglas, I'd recommend multiple remote client objects (1 per client) attaching to a single Data object (maybe via some intermediary). The many clients will meet at some single point (DatabaseManager, in my design); that's where you'll need synchronization. There are probably other ways of doing it, this one just seemed the cleanest to me. Jerry