GlassFish Utilities

The asadmin utility is located in /<glassfish>/bin. You can use this utility to perform the following:

  • If you are in the top level of the GlassFish directory, the command to stop GlassFish is:
    bin/asadmin stop-domain domain1
  • To restart GlassFish, type:

    ulimit -n 32768

    bin/asadmin start-domain domain1

Or, you can create an initialization script (see The glassfish.sh Script):

  1. Save the script in the following location:
    /etc/rc.d/init.d/glassfish.sh
  2. Type the following:

    chmod +x /etc/rc.d/init.d/glassfish
    
chkconfig --add glassfish

    You then can stop and start GlassFish by using the service command as follows:

    service glassfish stop

    service glassfish start

Note: If you installed GlassFish anywhere other than /usr/local/glassfish, you must change the following line in the GlassFish script to the location in which you installed the application:

ASADMIN=/usr/local/glassfish/bin/asadmin