In my design there is no such thing as 'LocalDataInteface'.
Clients of DataInterface must allways consider the possibility
of being dealing with a remote database and handle exceptions
apropriatelly.
Originally posted by Marcos Motta:
Your comments, please.
DataInterface: Declares RemoteException in all
methods. Provides access to the database, hiding
all details about the location of the database file
from its clients allowing the pluggable behaviour
required by the FBN gui client
Data class: implements DataInterface.
[ March 16, 2003: Message edited by: Marcos Motta ]
[ March 17, 2003: Message edited by: Marcos Motta ]
I might have a question about your locking schema. In remote mode client A locks record 1, and client B locks record 2. Now client A tries to lock record 2. How does it know that client B has the lock already and client A should not be able to get the lock. I didn't see that in your design.
So you interface should throw Exception, so that the implementation classes can then throw the more appropriate Exceptions.
BJ Grau wrote:
I am curious about your statement above. If DataInterface throws RemoteException in all methods, and Data implements it, then have you modified the methods in Data to throw RemoteException?
Originally posted by Marcos Motta:
Yes. I modified Data to throw RemoteException in all methods. And I am not confortable with it, but my point is: Data is an implementation of DataInterface wich is solely a means of allowing clients to work with remote or local databases using common interface.
This tiny ad is suggesting that maybe she should go play in traffic.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|