Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Server shutdown  RSS feed

 
Vikas Sood
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I have used RMI in my server side implimentation.And do not have and gui associated with the server,I am using ctrl C to shut down server through command prompt.
Is it ok to have sever shut down like this.
Kindly comment.
VikasSood
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many have done it like that and there is probably nothing wrong with it. You may want to add a shutdown hook with Runtime.addShutdownHook() for any clean up. You can also read the standard input for a more elegant shutdown.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!