This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Altering DB interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Altering DB interface" Watch "Altering DB interface" New topic
Author

Altering DB interface

David Abramowicz
Ranch Hand

Joined: Dec 10, 2004
Posts: 56
Hi!

I know that we're not allowed to alter the DB interface that the Data access class MUST implement.

However, I was thinking that the if the DB interface extends an interface with exactly the same methods, only WITH throws RemoteException; it would solve a lot of problems.

So:

interface BaseDB
{
read(int recNo) throws RemoteException
etc throws RemoteException
etc throws RemoteException
}

interface DB extends BaseDB
{
read(int recNo)
etc
etc
}


The question is, would I be violating any MUSTs (or taking it one step further, be auto-failed) if I tag the DB interface as extending another interface?

Thanks /Dave
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
You will still be auto fail because you have changed the given interface DB, from not extending anything to extending another interface.

I wonder, why you need to throw RemoteException for the data access. It is because it is only focus on data access no matter you are local or remote client. Also, as this is a low level API that access with the "DB", should the client really being able to invoke it directly?

For my implementation, I keep everything unchanged for the DB access interface, while I will provide (create) another interface for the user (GUI) to invoke with the network server, and only the network server (or data server) will invoke the DB interface.

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Altering DB interface