File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Turning jboss or glassfish into linux daemon/service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Turning jboss or glassfish into linux daemon/service" Watch "Turning jboss or glassfish into linux daemon/service" New topic
Author

Turning jboss or glassfish into linux daemon/service

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2416
    
    7

Howdy all, I have CentOS linux installed and glassfish app server installed to /opt/glassfish path. In CentOS the services or daemons can be started using command "service <name> start".

Now how to make glassfish into a linux service so that I can start/stop it using "service glassfish start/stop" command?

I read the asadmin create-service help thing and apparently I would need Solaris 10 commands or Solaris stuff. Is there another method to achieve this like without having Solaris commands?

Currently I have a shell script to start/stop glassfish but if I want to start glassfish when system boots I can't do that yet. Any suggestions are helpful.

Thanks


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

There are a few differences between Linux and Solaris, such as where to find logfiles, but in general you could take the Linux initscripts and port them to Solaris fairly easily. I think that there's actually an initscript included in the bin directory of JBoss.

Initscripts still work under the latest versions of Solaris, although for maximum effectiveness, it's good to plug into the "srv" subsystem, which is intended to replace the old init system. The main difference is that srv config files specify prerequisite services, so that, for example, JBoss won't attempt to start if the network didn't init properly.


Customer surveys are for companies who didn't pay proper attention to begin with.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2416
    
    7

Thanks Tim for your comments. I looks more complicated than it sounds. I shall keep it as it using my shell script to start/end the server for now
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Turning jboss or glassfish into linux daemon/service