This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Max Habibi - DBClient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Max Habibi - DBClient" Watch "Max Habibi - DBClient" New topic

Max Habibi - DBClient

bob dapaah
Ranch Hand

Joined: Jan 15, 2002
Posts: 46
Just a short question:
The DBClient class detailed in the Developer book by M. Habibi doesn't seem to throw RemoteException for its methods.
This causes problems when trying to to compile the implementation class for the Remote interface extending DBClient.
Would it be correct (in terms of design) to amend the abstract methods in DBClient to throw RemoteException so that this exception can be thrown in the above-mentioned implementation class? Is the omission of 'RemoteException' from the DBClient interface a typo or am I missing something?
Thanks in advance
Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
I compiled the sampleproject in the book. Everything was fine. I don't know what happens in your case...

bob dapaah
Ranch Hand

Joined: Jan 15, 2002
Posts: 46
My mistake...DBClient's methods throw IOException thereby alowing the methods from the implementation class for the remote interface to throw RemoteException (a subclass).
Didn't think it through at the time of asking the question I guess
I agree. Here's the link:
subject: Max Habibi - DBClient
Similar Threads
NX:contractor - stubs
B&S: throwing RemoteException
Interface reuse
Understanding DBClient in Max's book
DBClient interface