title: How to write a Java daemon
body: <p>This will be a network application that will always (or near as always as I can manage) be listening on a given port.</p>
  
  <p>I'm fairly new to Java, and very new to non-web server side programming, so I'd like to get feedback from the community on my assumptions and preliminary plans.</p>
  
  <p>I've read about jsvc ( <a href="http://commons.apache.org/daemon/jsvc.html" rel="noreferrer">http://commons.apache.org/daemon/jsvc.html</a> ) and am currently operating on the assumption that this is the "best" way to write a daemon in java for a linux box (likely running centOS).</p>
  
  <p>Can nagios be configured to monitor whether or not my daemon is running, and to alert me or the sys admin when it isn't? (I assume yes, but I'm not a very talented sys admin type)</p>
  
  <p>This will be an SMPP client app (or ESME app I guess) which is why I've chosen Java as it seems to be a very mature platform for SMPP. However, I know that it's more "traditional" to write a daemon in C/C++. With modern Java, performing fairly uncomplicated tasks, am I likely to run into any major disadvantages?</p>
  
  <p>What's the best way to manage deployment of new builds? Just stop the daemon and replace the binary as quickly as possible and restart?</p>
  
  <p>Any other input would be greatly appreciated.</p>