Meaningless Drivel is fun!*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: Mandatory data acess class and interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S: Mandatory data acess class and interface" Watch "B&S: Mandatory data acess class and interface" New topic
Author

B&S: Mandatory data acess class and interface

Michael Cox
Greenhorn

Joined: Sep 04, 2008
Posts: 10
Hi,

Bodgitt and scarper 2.1.1 says:

"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface"

Does mean that this interface must be the one I offer to remote clients?

Or can I wrap the DB class in another class and offer a better interface to my remote client?

Be grateful for your thoughts and experiences,

Regards,

Michael
Jethro Borsje
Ranch Hand

Joined: Jul 22, 2008
Posts: 100
You can use the Facade design pattern to provide a 'better' or more appropriate interface to your Clients if you want to.


SCJP, SCJD
Michael Cox
Greenhorn

Joined: Sep 04, 2008
Posts: 10
I'm still having pre-submission wobbles about this one.

Just because there is a mandatory DB interface does that mean that your RMI Remote interface offered to clients has to look the same?

(perhaps only with the addition of throwing RemoteException)

Currently my database object does implement the mandatory DB interface, but I wrap that database class in another class which offers a very different remote interface.

Be grateful for further assurances that I'm not cruising to automatic failure through misinterpreting the instructions.

Michael
Jethro Borsje
Ranch Hand

Joined: Jul 22, 2008
Posts: 100
I think that what you are doing is fine.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: B&S: Mandatory data acess class and interface
 
Similar Threads
About Urly Bird 1.2.0
Server UI
rmi/local approach
B&S 2.1.2 Interface
NX: Bodgitt and Scarper: may I modify the javadoc of the interface DB.java?