GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes [URLyBird] Data 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 "[URLyBird] Data interface" Watch "[URLyBird] Data interface" New topic
Author

[URLyBird] Data interface

Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hello,
i have several doubts regarding the DBAccess interface that the Data class must implement. This information is included in the server section of the document.

The problem arises related to the automatic check of the requirements.
I supose this class is going to be dinamically loaded from the server VM, or it's going to be exported to be tested in a client machine.

I decided using RMI, so in the first i should decide to wrap the Data object class in another (Remote) object and then give the client other remote interface more elaborated because this interface doesn't seem to be logic, ie i think locking methods should not be public to the client.
The second case is that worries me.
If this is the remote interface, what about RemoteExceptions? And why let a client lock a record without any other consideration?

I'm not sure at all is clear what i'm asking.
Thanks jRanchers
[ December 13, 2004: Message edited by: Ignacio del Valle ]

SCJP, OCMJD, OCMJEA
Lalit Deshmukh
Greenhorn

Joined: Nov 28, 2004
Posts: 1
Ignacio,

I think you are on right path(at least that's what I have taken.)

My Data object implements DBAccess interface. This Data object is planned to do low level work e.g. reading and writing to file.

I also have a DBClient interface for clients, whose methods throw RemoteException. The object that implements this DBClient interface wraps methods of DBAccess interface and uses the Data object.

Hope this helps.

+Lalit
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hi Lalit, thanks for your reply.
I also think this is the best choice.
Regards
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11465
    
  94

Hi Ignacio,

I decided using RMI, so in the first i should decide to wrap the Data object class in another (Remote) object and then give the client other remote interface more elaborated because this interface doesn't seem to be logic, ie i think locking methods should not be public to the client.


You might be interested in reading the discussions in "Should lock methods be callable by the client". It is extremely long, but there are some good arguments both for and against what you are suggesting.

My personal opinion is that the lock cookies only make sense if the lock method is made public to the client. (As you will see though, there is the counter argument that lock cookies do not make sense in any situation ).

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Thank you Andrew, that was just what i looking for!
Regards
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

A very interesting thread!
Thanks again, Andrew
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Well, i've just finished reading the previous thread, but the question goes on.
Is the election determinant for passing the automatic check phase?
I think either of them (2 tiers / 3 tiers ) - see this thread - will be accepted if this phase is passed and you have the chance to explain your design to the examiners.
So this question is for current SCJDs:
What was your election?
Regards
[ December 13, 2004: Message edited by: Ignacio del Valle ]
 
GeeCON Prague 2014
 
subject: [URLyBird] Data interface