Open ops4j-issues opened 15 years ago
Thomas Joseph commented
PAXRUNNER-228 allows a detached pax runner for most of the OS plaforms and hence should be easy to daemonise on Linux. Please see if that meets your needs.
Thomas Joseph commented
Please read the above comment as:
PAXRUNNER-240 allows a detached pax runner for most of the OS plaforms and hence should
be easy to daemonise on Linux. Please see if that meets your needs.
Björn Pollex commented
The advantage of using Java Service Wrapper is that it also works as a watchdog - when the JVM crashes it is automatically restarted.
Pieter commented
On linux the runner deamon hight work, but on windows it is not of much use. We recently used yajsw to create a Pax Runner service on windows. It wasn't much of an issue really, most of the magic is in the following part of yajsw config:
#********************************************************************
# working directory
#********************************************************************
wrapper.working.dir=E:\\work_dir
#********************************************************************
# Application main class or native executable
# One of the following properties MUST be defined
#********************************************************************
# Java Application main class
wrapper.java.app.mainclass=org.ops4j.pax.runner.Run
#********************************************************************
# Service execution commands
#********************************************************************
wrapper.java.command = java
wrapper.java.classpath.1 = lib\/pax-runner-1.7.6.jar
wrapper.app.parameter.1 =
wrapper.app.parameter.2 = --bcp\/p=mvn:org.apache.servicemix.bundles\/org.apache.servicemix.bundles.javax.mail\/1.4.1_3
wrapper.app.parameter.3 = --vmOptions=-server -Xmx4192M -XX:MaxPermSize=128M -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
wrapper.app.parameter.4 =
wrapper.app.parameter.5 = scan-composite:file:provisionfile.txt
wrapper.java.additional.1 = -Dorg.ops4j.pax.url.mvn.repositories=http:linktoourmavenrepos...
Björn Pollex commented
This doesn't seem to provide a controlled shutdown. I would like to give my bundles the opportunity to cleanup properly when the service is stopped.
Pieter commented
You're right it should. YAJSW has ways to add a shutdown hook, but I have not yet tried that. I usually telnet to the GoGo prompt and give a "stop 0" command, which causes a controlled shutdown. It should be possible to instruct YAJSW to do the same.
BTW: I think YAJSW and JSW are similar, I don't try to sell YAJSW here, it just happens to be the wrapper I use.
Cameron Braid created PAXRUNNER-228
may use one of:
https://akuma.dev.java.net/
http://yajsw.sourceforge.net
http://wrapper.tanukisoftware.org/
Votes: 0, Watches: 1