• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Server Sutdown

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I shut down the server and lock whole databse wih -1?
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic