Friday, April 17, 2009

Glassfish quickies

Here are two quickies for Glassfish.

Quickie 1: How to create a new domain.
asadmin create-domain --adminport 4949 --savemasterpassword true mydomain
where --adminport is the port number for the administration GUI
and --savemasterpassword tells GlassFish to save the master password. It will make it easier then to create a service.

See Also

To see the full syntax and options of the command, type asadmin create-domain --help at the command line.

Quickie 2: Setting GlassFish as a Windows Service
When running GlassFish on a Windows box one has to install it as a service so GlassFish keeps running once you log off.
Here how you do it:
1. Download GlassfishSvc.jar
2. Copy your file to your GlassFish installation and cd to this folder
3. Run the following command:
C:\Program Files\Sun\GlassfishV2>java -jar GlassfishSvc.jar -i -n ServiceName -m DomainName
where -i is to install, -u to uninstall.

See Also
More info here

No comments:

Post a Comment