I have to change all the public methods in Data to throw IOException. <snip> Is it OK to make changes like this to the Data class (for the exam).
Is there any other way to overcome this problem?
At any point of time there will be one instance of RemoteData. Initially I was thinking of using singleton pattern for Data class. I am not sure whether I still need to make Data a singleton.
3. In the ranch I have seen many postings on using ConnectionFactory and creating a new instance of RemoteData for each client. Which is different from my design (item 2). Why do we have to do it this way. Trying to find out, whether I am missing any thing if I do it as per item 2.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
If each client gets an instance of RemoteData, which is a wrapper to Data, I think the adaptee (Data class) should be a singleton or pass the same instance of Data to the RemoteData constuctor. Can you please comment on this.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
What about DBClientRemote? Does it implement DBClient as well? Or extend DBClientImpl? Or does it just "have a" DBClientImpl.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog