In my opinion, implementing the remote database connection will automatically include implementing the local database connection. The only difference between the local and remote connections is the DNS and port number you specify in the command line argument. If you are using the own machine's DNS and port number, it will connect to your own local machine; otherwise, it will connect remotely. If that is the case, what is the point of specifying remote or local connection? Please correct me if I am wrong.
Rudy, I think you are missing the point. When Sun says non-network mode, it means as if no tcp/ip and any type of networking level are installed on the machine; which means you can't use any DNS, or local port.
Rudy - What you're expected to demonstrate is code that does and does not require a network connection. This means one section of your code will not be able to use RMI. This raises an interesting issue -- how to write server code that can protect shared data regardless of the type of connection the client has. In short, you have to separate issues of thread and synchronization from connectivity. Not hard, really, but you do have to think it through. ------------------ Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Joined: Dec 27, 2000
If that is the case for local connection, I can have direct access to the database without using RMI or object serialization. The direct access could be the result of subclassing the provided data class. Is this true?
Be careful how you think about direct access! The question here is ensuring that synchronization takes places regardless of the type of connection. If your scheme for "direct access" doesn't conflict with that, you're good to go.
Hi Michael, I passed the SCJD sometime ago with a good score but I dropped 20% on my GUI which I had thought was really great. The thought has just occured to me that maybe I mis-interpreted the requirements. I always planned to implement my direct access connectivity on my server until I really gave it some thought after which it really seemed pointless. I then implemented direct access on the client using a separate database which worked fine and seemed to satisfy the requirements. Do you feel that the Client in Direct Access mode should connect to an existing Database running on the same machine and therefore in the same VM? My original plan was to have my simple server GUI with a button that launched a non-networked version of the client. I don't need an answer, I'm just curious. Thanks Amanda
Originally posted by Michael Ernest: Be careful how you think about direct access! The question here is ensuring that synchronization takes places regardless of the type of connection. If your scheme for "direct access" doesn't conflict with that, you're good to go.
Joined: Dec 27, 2000
Thanks for Michael and Adrian's advice. After going through the requirement specification once more, you are right that the local connection does not rely on TCPIP. In that case, I come up with the idea of using the three-tier databse model. My approach will be to build an application server as the middle- tier that processes communication between the client application and the database which is in fact the database server. Using this approach, I can have a full control access to the database, and thus any thread-safe and multiple client access issues can be separated and implemented only at the database server. In addition, the database access will be completely transparent to the client regardless of remote or local, and therefore I can drop out the idea of direct access.