Hi.
I'm just reviewing my assignment and I'm planning to submit this week and have the exam next monday.
Please review and comment.
I've decided for modification of the Data class. The lock and unlock methods have been implemented in this class using it's reference as value in the lock's map. This way I can lock and unlock records in local mode when working in a multithread environment.
The Data class implements DataInterface that has all the public methods of the data class defined and extends Remote. This way I only have one interface that can serve in local and remote access (draw back is that RemoteException must be catched by the user of Data class).
Two classes implementing the DataInterface have been created, one for local access and other for remote access. The remote data class, besides a instance of Data, has a reference to a lock manager class that uses the client reference for the lock (a RMI factory was used in the server).
The local database implementation only has a instance of a Data class.
In the client side, besides all the GUI classes, I have a DatabaseFacade class that uses the local or remote data implementation depending on the connection mode.
Packages are as follows:
suncertify.client
-----------------
Gui classes
LocalDataImplementation.java
DatabaseFacade.java
suncertify.server
-----------------
FBNServer.java
RemoteDataImplementation.java
DataInterfaceFactory.java
RemoteDatabase.java
LockManager.java
suncertify.db
-------------
Data.java
DatabaseException.java
DataInfo.java
DataInterface.java
FieldInfo.java
suncertify.utils
----------------
Utils classes
Help class
I've decided to place LocalDataImplementation in the client and RemoteDataImplementation in the server package. Also the LockManager class as been moved to the server package as only the server uses it, so there is no point of placing it in the db package.
The reservation is executed in a separate
thread that automaticly opens a dialog informing the user of what is being done. When finishes, a dialog is presented with the user on success or if some problems have occured.
The GUI as been implemented with a MVC. The model do all the operations needed by the FBN application, the views have "hook" methods that are defined by the controller.
On the top of the screen there is a menu and a border layout has been used. On the north there is the search panel and combo boxes for origin, destination and carrier followed by the search button.
In the center there is the JTable and in the south is the reservation panel.
Comment's please.
Thanks,
Miguel