dev@glassfish.java.net

Re: Starting Glassfish as a Linux daemon

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Tue, 12 Dec 2006 15:05:48 -0800

I have responded to Wouter in a private
e-mail that deals with specific implementation
details of create-service command which I think
this alias is not interested in :) If someone
wants to know details, let me know.

Kedar


Wouter van Reeven wrote:
> Hi Kedar,
>
>
> So, I managed to modify the existing code so now I can create a start/stop script
> on Debian Linux for a domain using the command sequence in your weblog. I'll be
> off to JavaPolis in Belgium for the next few days but in the weekend I'll create
> an RFE for this and post a patch for the code I created so far. By the way, it
> still works on Solaris 10 as well :-)
>
> At the moment I have two issues. The first issue is due to apparent lack of
> javadoc. The thing is, that script that I create needs to be made executable and
> I have troubles finding out if there already is code in the glassfish repository
> that does this. I know how to make a file executable but I'd like to prevent
> coding something that already exists.
>
> The second issue is one of coding conventions. So far I have been building upon
> the existing SMFService.java and SMFServiceHandler.java files. Strictly speaking
> these filenames refer to a Solaris type of Service. Under Linux, these services
> generally are referred to as daemon which SMF Services are too but SMF Service
> is a specific type of daemon etc etc.
> So, the issue is whether these specific cases should be split up. Now I have put
> lots of "if (OS.isSolaris10())" and "if (OS.isDebianLinux())" statements through
> the code but I think this is ugly. Moreover, if we centralize the check for the
> OS and we create separate files for all kinds of Services, we don't have to check
> for the OS every time we need to do something.
> Can you please tell me whether there is a convention for this in the glassfish
> contributors community?
>
>
> Thanks,
>
> Wouter
>
>