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 17:22:34 -0400

On Mon, Sep 13, 2010 at 4:53 PM, <glassfish_at_javadesktop.org> wrote:
>
>
> So it's probably not applicable on Windows, but only on Solaris or
> something. Who knows. :-) There is a somewhat cryptic remark earlier in
> this thread where it is suggested that repeated invocations of this command
> could leave artifacts lying around, though the author didn't go into any
> detail; perhaps the --name element affects those artifacts?
>

The GF uninstaller and remove service should get rid of any artifacts unless
there is a bug with it. Sometimes on Windows the OS will not remove a
service immediately from the services system but will flag it for removal
the next time the system is rebooted. It has to do with how Windows service
system maintain service states. Maybe an artifact from something like that
is what they are talking about.

> 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.
>
> I gather it's tough to get right.
>
> I would be interested to know from the command's author(s) if -Xrs is
> included or should be included or was omitted on purpose--my service seems
> to be running fine at this point, but a while back you had to make sure that
> the -Xrs JVM option was hacked into your Glassfish service startup script
> machinery or the damn thing would hang up on you when you logged out.
>

Yes regarding this in 3.0 I first brought this to the attention of Byron
Nevins back in Feb. (there's a whole long thread in here with the details)
and we determined that with v3 you had to add -Xrs to the asadmin.bat file
because that it run by the service wrapper and is responsible for starting
the asadmin JVM which starts the server JVM. Both of those VMs have to
ignore the signal sent to them by Windows when a user logs out. Don't know
about 3.1 esp. with the changes to support node agents etc.

-Noah