Comment regarding Jetty startup via Windows Service ?

Rod Widdowson rdw at steadingsoftware.com
Fri Dec 20 06:04:53 EST 2013


> Whenever you have a chance and if you think it is worthwhile, could
> you comment on the Jetty docs describing startup via Windows Service
> [1] ?

Not sure what to say.  The very good news is that they are now recommending
procrun, which will save Scott or me an afternoon's coding.  As a detail I'd
take exception to their choice of installation path, but that’s a discussion
that we will have, and that Scott and I will disagree on (and I will
lose...) further down the pike.
 
> I came across a jetty-dev list thread which said that there are
> basically two options for running as a service on Windows : either a
> service wrapper or via embedding Jetty

The bottom line is that the container needs to run as a daemon - this is
called a Service in windows and comes with all the usual sort of gubbins
you'd expect.  You can trivially run the container in a restricted account,
you can use the standard system management tools to look after it give it
extra permissions, declare it to the firewall and so forth.  You could
probably get something runnin by doing things differently, but you really do
not want to.  The Service gives you exactly what you need, the users expect
it and it never goes well when you try to do things that Microsoft don't
want you to.

The trouble is that the service has to be native code.  So the canonical
solution is to not run java.exe, but to link your implementation of the
service APIs against the java DLL.   This is pretty much general purpose
code and a few people have done them.  Jetty used to recommend something
which was GPLd, but now they recommend the apache one (which is what apache
uses to run Tomcat).  The set up details for procrun are of general
interest, but we would do all of that inside our wxs (windows installation
script) rather than via their batch files

> All I know about the Windows installer for V2 is that there is a
> captive Tomcat, I am pretty unfamiliar with that environment.

In general the current windows experience is the same as anywhere else - you
have to install and manage the container.  The quick installer does a one
off install of a 'captive' Tomcat and configures it to connect to an Active
Directory, but once the initial install is done the upgrade of both the IdP
and the Container are devolved back to the user who then has to use the
standard IdP or Tomcat upgrade mechanisms.  This last is something I want to
avoid in V3.

Rod



More information about the dev mailing list