3

I wrote a Daemon by using the apache commons sample code:

public class LockDaemon implements Daemon {

@Override
public void init(DaemonContext context) throws DaemonInitException, Exception {
    LogManager.getLogger().info("initialized with 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 the example does not mention how to install this class with procrun. Procrun needs a static "Start Method", which I do not have when using the code above.

So which start (and stop) method needs to be set for procrun to make the code above work?

gorootde
  • 4,003
  • 4
  • 41
  • 83

1 Answers1

0

This is question is further discussed in this thread: Howto setup a Daemon implementation as windows service

Community
  • 1
  • 1
mson
  • 61
  • 1
  • 5