Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Originally posted by Paul Anil:
1. Have an abstract class, say, DBAdapter that has all the methods (but abstract) of Data class.
2. For Remote case, extend this class, say RMIDBAdapter, and of course, you'll need to have to define a Remote interface etc. basically the whole 9 yards needed for RMI.
3. For local mode, have LocalDBAdapter. This class will internally use Data class instance and will delegate all the calls to it.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Originally posted by Paul Anil:
1. Instead of letting the client code use loose methods read, lock, read, modify, unlock directly, you can provide a method bookTicket(...) that can be directly used by the client.
2. If you use an interface, then what will be the throws clause for it's methods? If you keep RemoteException, your client components will have to catch RemoteException thereby making them aware that RMI is being used.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |