This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi guys, I�ve seen a few designs in this magnificent forum, and I have a suggestion for another server/database design, and would like your thoughts on it, especially from a Bartender? Draw your UML as follows: Data.java is a member of DataAccess.java and is Singleton controlled. DataAccess is in purely used for local access to the database and implements DataAccessInterface that in turn extends Remote for RMI. DataAccessServer extends DataAccess implements UnicaseRemoteObject and uses overriding for the methods that use locking via the member LockManager.java. I think the difference is that the DataAccessServer extends on the DataAccess�s functionality � to basically implement the record locking. A connection factory can still work as DataAccessServer implements the DataAccessInterface indirectly through DataAccess. This design removes the need for separate remote and local access classes to Data.java in some designs and conditional code to implement locking. Mick
This design removes the need for separate remote and local access classes
In your design DataAccess is your seperate local access class and DataAccessServer is your seperate remote access class. BUt you only have to override the methods that are different between the two modes. It's kind of similar to my Beta assignment, however that was just to resolve the problem with their Interface not being complete, and having to create another interface that extends the first interface. The big key to your design will be to see if it can accomodate all the requirements onf the assignment. I think it should be fine. Mark