Hi Sai,
Thanks for quick reply..
From your recommendations...design will change like this..
Design:
db:
--Data(class)implements DataAccess
..modify this class (it also implements criteriaFind())
--DataAccess(Interface)
...defines all public methods of Data Class
...all methods throws Exception
--DataAccessRemote extends Remote,DataAcess
...methods throws DataBase,Remote & IO Exceptions.
--DataAccesFactory(interface)
...returns DataAccess or DataAccessRemote.
--DataAccessFacade (Interface)
...contains searchFlight();.bookFlight() methods..
server:
--DataServer(class) extends UnicastRemoteObject,implements DataAccessRemote
...Data Class is wrapped within
--LockManager class..
--ConnectionFactory
client:
--DataProxy(class) implements DataAccess
...Data Class is Wrapped with in...
--StartGUI(classs)
--DataAccessFacadeImpl(class) implements DataAccessFacade.
...It will use DataAccessFactory class to get the..
DataAccessLocal or DataAccessRemote..
1.From the above design.. We are modifying Data Class with full implementation of (with record locking..)lock(),unlock(),criteriaFind() methods.. but record locking is not necessary in Local mode ..
2. I have one choice in my mind. I will neither modify the Data Class nor Subclass it..
I will have DataAcess,DataAccessRemote interfaces.
--DataServer implements DataAccessRemote with implementation of record locking ... Data Class is wrapped within this class for other methods..
--DataProxy implements DataAccess.It It wrapps Data class with in for all methods.. except criteriaFind()
If I am doing above design #2.. then I am deviatiing Sun's Instruction
Part of your assignment will be to enhance the Data class. You may do this by modification or subclassing, but you should document the approach and reason for your choice.
3.
Sai-- I would rename the DataClient to DataProxy
Could you please elaborate above..
4.
Sai-- 3) You need to create an interface that extends Remote for the ConnectionFactory to implement
Could you please explain this with simple example.
regards,
Suresh
[ June 20, 2002: Message edited by: Suresh Babu Seeram ]
[ June 20, 2002: Message edited by: Suresh Babu Seeram ]