aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Server Sutdown 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 "Server Sutdown" Watch "Server Sutdown" New topic
Author

Server Sutdown

Harry22
Greenhorn

Joined: Jan 31, 2002
Posts: 2
How do I shut down the server and lock whole databse wih -1?
Travis Zimmerman
Greenhorn

Joined: Mar 06, 2002
Posts: 27
I don't believe there is a requirement to have an implementation for the use of locking the entire database. My understanding is that it should only be available int the Data class. As for shut down on the server, I have heard others used ctrl-c, and I plan to do the same.
One alternative is to have the server doing its main duties in a background thread while listening for user input on the command prompt. Having a user type quit could call for whatever shutdown processing is needed before exiting.
Travis Zimmerman
[ March 15, 2002: Message edited by: Travis Zimmerman ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Harry, first Javaranch has a naming convention to have your user name be your first and last name.
Secondly, there is a requirement to include the lock(-1) to lock the entire database.
I would suggest creating a simple GUI to start your server, with a button or menuitem that shutsdown the server. In the action of that have the lock(-1) in the code along with close().
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server Sutdown