commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Resare <>
Subject Re: [Daemon] some thoughts on commons-daemon
Date Thu, 18 Sep 2003 19:04:21 GMT
tor 2003-09-18 klockan 16.07 skrev Remy Maucherat:
> Daniel Resare wrote:
> > Why is there no reload() method of the Daemon interface? It seems like
> > sending SIGHUP to jsvc translates to calls to stop() and start(), but
> > that is semantically different from how most programs other programs
> > handle SIGHUP.
> I don't see a point. Stop + start is good enough IMO. reload adds 
> complexity.

At commons-daemon level I would argue that the complexty added is
minimal, but correctly impelmented at the java level a smart reload()
implementation would speed up changing configuration much compared to
shutting down and starting up the whole application again.

Compare using the manager servlet to reload a webapp in tomcat to
restart the whole tomcat instance :)

> > What is the difference between stop() and destroy() in the Daemon
> > interface? 
> Destroy is for releasing all resources. For example, a daemon may want 
> keep its server socket open on stop (since it can't be reopened unless 
> you are root - the main goal of daemon is to sove the 
> port-80-without-root problem).

To explain that semantic meaning to Daemon implementors will be a
challenge. Another interesting fact is that the current implementation
of commons-daemon doesn't ever call destroy(). After having called
stop() in the Daemon implementation it just calls System.exit().

port-80-without-root on restart/reload would be possible to solve nicely
however with a reload() method. *smile*

> > 3) Just out of curiosity, what does jsvc stand for?
> Java service maybe.

Ah, I should have figured. Sounds like an abbreviation from the good old
8.3 days.


View raw message