*Connectionfactory class
-offers one method getConnection()
-is bound as the ONLY RMI Object to the RMI registry
-returns a RemoteData object, which is constructed with
a reference to the server side Data member
*Data class
...
-implemented the lock()/unlock() and changed signature to synchronized ...
-added a HasSet to track the locked records, but do not track who locked
(This would require a HashMap to store additional the callee reference)
*Lockmanager class
The purpose of this class is to verify that only the owner who locked
also unlocks. The rest of the functionality is the same as the
locking mechanism in data class, but uses a HashMap for the key-value pair.
(key=callerID object reference used, value=record locked in db)
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
*IDataAccess Interface
declares the business methods called by the GUI client
-getAllTitles() // returns table titles
-getOriginAirports() // returns all origin airports for search
-getDestinationAirports()// returns all destination airports for search
-book() // book a flight
-criteriaFInd() // do a search in the db
swimming certificate (A & B), shoelaces diploma, and some useless java ones.
I do it in the data class because the requirements say ...
You did not implement the lock/unlock methods in the data class, did you loose points for this ?
I see your point , i could change the lock/unlock signature in data class to ...(Object callee, int record)
as in my LockManager and so forget the additional LockManager.
2.) Each RemoteData references the Lockmanager and calls lock/unlock when needed. In my Lockmanager
the signature would be somehting like : lock/ unlock (Object callee, int record) and simply stores the callee
reference this and its records.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
You showed up just in time for the waffles! And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|