views:

791

answers:

4

Did Jetty 7 drop support to run as a service using Java Service Wrapper? What options do I have now?

A: 

Check this out : JETTY/Win32Wrapper

nmcy
It's not included in the Jetty 7 download.
Jeb
+1  A: 

In the latest stable version of JSW (3.4.1) there's WrapperJarApp method of integration:

This is part of my configuration:

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
wrapper.java.classpath.1=%WRAPPER_HOME%/lib/*.jar
wrapper.java.classpath.2=%JETTY_HOME%/lib/*.jar
wrapper.java.classpath.3=%JETTY_HOME%/start.jar
wrapper.java.library.path.1=%WRAPPER_HOME%/lib
wrapper.app.parameter.1=%JETTY_HOME%/start.jar
Paul McKenzie
A: 

Take a look at Procrun from the Apache Commons. You'll want to browse the native binaries download area to get the Windows binaries.

glb
A: 

You can get the src from: http://svn.codehaus.org/jetty/jetty/branches/jetty-7/jetty-win32/ and build it yourself.

But I manually installed the wrapper as any “standard” wrapper installation.

Took the original Jetty-Service.conf file and changed:

wrapper.java.mainclass=org.mortbay.jetty.win32service.JettyServiceWrapperListener to wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

And added…

wrapper.app.parameter.1=org.eclipse.jetty.start.Main <-- Main class wrapper.app.parameter.2=../etc/jetty.xml wrapper.app.parameter.x=../etc/jetty-x.xml <--Any additional config files you wish to include… wrapper.app.parameter.y=../etc/jetty-y.xml

Seems to start fine and it seems to shutdown gracefully too.