Forums Register Login

[URLyBird] Data interface

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hi Lalit, thanks for your reply.
I also think this is the best choice.
Regards
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Thank you Andrew, that was just what i looking for!
Regards
+Pie Number of slices to send: Send
A very interesting thread!
Thanks again, Andrew
+Pie Number of slices to send: Send
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 ]
Something about .... going for a swim. With this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 910 times.
Similar Threads
How to throw RemoteException?
B&S 2.2.2 - Network Layer Query
NX: Some question about DBAccess
NX: More interface confusion.
RMI Interface
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:20:49.