I have a question regarding the requirement listed below. In the
SCJD instructions under the Non-Networked Mode section.
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form,
but must not use the network server code at all.
I am working on the URLyBird 1.2.3 version of the assignment. Due to various reasons i was unable to work on it until recently. I a using version 1.5.0_08-b03 of
Java.
I have finished (hopefully) the Model Layer an have sarter to design,
test, implement my RMI solution.
I have chosen to use RMI.
Here is what my design looks like:
I have created a general interface called DBClientIF that has the same methods as the DBAccess IF provided by SUN, the only difference is that they are decorated with the
throws RemoteException
clause.
To use RMI I have a another IF called RemoteDBIF with a signature of
The actual RMI implementation is in a class called RemoteDBAapter
The above mentioned code should address the "newtork" mode of the assignment. The only thing I might add would be to expose the Application specific Exceptions that can be thrown by the model layer. (in DBClientIF)
Now for the
Local
or non-networked mode. To address the Local mode I created an implementation class called LocalDBAdapter that implements the DBClientIF.
Finally to the real question.
According to the assignment instructions
Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.
Does my local design adhere to the requirments?
To recap I am using a common Interface for both networked and local modes. My DBClientIF decorates the methods with a
throws RemoteException
and my local implementation implements said interface. Is the DBClientIF considered
network server code?
My feeling is that for code to be considered network it needs to extend
and implement
. Just because an interface says that it could throw a RemoteException, the implementation might never actually throw it?
Thoughts?