users@glassfish.java.net

Re: Glassfish as a service on windows: asadmin create-service fails

From: NBW <emailnbw_at_gmail.com>
Date: Mon, 13 Sep 2010 16:00:00 -0400

As of 3.0.1 (I can't speak to 3.1 because its not baked enough for me to
spend time with) that name element is what you will see when you open up the
Window's Services Control Panel and look at the "Name" column. It is used as
the "Display Name" property of the service. The XML tag probably should have
been displayName instead of name. The service property called "Service Name"
is what gets set by the --name switch to create-service. Interestingly,
there does not appear to be a serviceName element in the XML you included.
If <id> is supposed to be the "Service name" then call it <serviceName> not
some cryptic ID. At least have the markup clearly convey what it is supposed
to describe!

The whole bit of proper Windows service support in GF either v2.x or v3.0.x
has *never* worked out of the box. You have always had to end up hacking
this file or that file with things like JVM settings and such. It really
amazes me that something intended for Enterprise usage can't deliver proper
Windows service functionality.

-Noah


On Mon, Sep 13, 2010 at 3:02 PM, <glassfish_at_javadesktop.org> wrote:

> I've stumbled across Kohsuke's winsw project, which appears to be being
> used by some guts somewhere deep within the create-service command.
>
> Then I found the .xml config file created, presumably, by the
> create-service command. It looks like this:
> [code]
> <service>
> <id>application/GlassFish/LEADGlassfish</id>
> <name>domain1 GlassFish Server</name>
> <description>GlassFish Server</description>
> <executable>C:/glassfish-3.1b19/glassfish/bin/asadmin.bat</executable>
> <logpath>C:\\glassfish-3.1b19\\glassfish\\domains/domain1/bin</logpath>
> <logmode>reset</logmode>
> <depend>tcpip</depend>
> <startargument>start-domain</startargument>
> <startargument>--verbose</startargument>
> <startargument>--domaindir</startargument>
> <startargument>C:\\glassfish-3.1b19\\glassfish\\domains</startargument>
> <startargument>domain1</startargument>
> <stopargument>stop-domain</stopargument>
> <stopargument>--domaindir</stopargument>
> <stopargument>C:\\glassfish-3.1b19\\glassfish\\domains</stopargument>
> <stopargument>domain1</stopargument>
> </service>
> [/code]
> Note the suspicious? maybe? name element, and the distinct lack of anything
> that looks at all remotely like "LEADGlassfish" (the name I attempted
> repeatedly to supply to the service creation machinery). I will try
> manually editing this file to have a name element with a value of, say, "gf"
> (all one word with no spaces). Maybe that will do it....
>
> L
> [Message sent by forum member 'ljnelson']
>
> http://forums.java.net/jive/thread.jspa?messageID=482553
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
"Computers are fast. They just take longer."