java - Procrun with org.apache.commons.daemon.Daemon -
i wrote daemon using apache commons sample code:
public class lockdaemon implements daemon { @override public void init(daemoncontext context) throws daemoninitexception, exception { logmanager.getlogger().info("initialized arguments {}", context.getarguments()); } @override public void start() throws exception { logmanager.getlogger().info("start called"); } @override public void stop() throws exception { logmanager.getlogger().info("stop called"); } @override public void destroy() { } }
unfortunately example not mention how install class procrun. procrun needs static "start method", not have when using code above.
so start (and stop) method needs set procrun make code above work?
this question further discussed in thread: howto setup daemon implementation windows service
Comments
Post a Comment