This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Data.close() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Data.close() method" Watch "Data.close() method" New topic
Author

Data.close() method

Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Hi All,
It is very obvious that in the local mode, when the app is closed, the db.db file should be closed. However, in the case of the Remote server, this can only be closed if the entire server is shutdown. Is there anything special about killing the remote server? I mean, if you kill the server, the client could detect the exception and give up. But is there anything else that needs to be done?
Thanks.


Aruna A. Raghavan<br />SCJP, SCJD, SCWCD
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

But is there anything else that needs to be done?

The obvious choice is that nothing should happen if a remote client calls close().
Eugene.
Daniela Ch
Ranch Hand

Joined: Dec 13, 2002
Posts: 96
not even release the locks?
technically he can not have a lock if he is calling close, but I dont know, an empty method always bothers me...
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

not even release the locks?

If you are doing it right, your locks are always released, no matter what:

Eugene.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Eugene Kononov:
If you are doing it right, your locks are always released, no matter what
But if you're coding for reuse (is that still in the instructions?), you cannot rely on clients always doing it right.
- Peter
[ January 06, 2003: Message edited by: Peter den Haan ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Data.close() method