Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server Sutdown

 
Harry22
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I shut down the server and lock whole databse wih -1?
 
Travis Zimmerman
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic