1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish Server
Domains for Administering GlassFish Server
Domain Administration Server (DAS)
Creating, Logging In To, and Deleting a Domain
To Create a Domain From a Custom Template
Starting and Stopping a Domain
Configuring a DAS or a GlassFish Server Instance for Automatic Restart
To Configure a DAS or an Instance for Automatic Restart on Windows
To Configure a DAS or an Instance for Automatic Restart on Linux
To Configure a DAS or an Instance for Automatic Restart on Oracle Solaris
To Prevent Service Shutdown When a User Logs Out on Windows
Suspending and Resuming a Domain
Setting Up Automatic Backups of a Domain
To Create a Backup Configuration
To Enable a Backup Configuration
To Disable a Backup Configuration
To Delete a Backup Configuration
Backing Up and Restoring a Domain
Re-Creating the Domain Administration Server (DAS)
4. Administering the Virtual Machine for the Java Platform
6. Administering Web Applications
7. Administering the Logging Service
8. Administering the Monitoring Service
9. Writing and Running JavaScript Clients to Monitor GlassFish Server
10. Administering Life Cycle Modules
11. Extending and Updating GlassFish Server
Part II Resources and Services Administration
12. Administering Database Connectivity
13. Administering EIS Connectivity
14. Administering Internet Connectivity
15. Administering the Object Request Broker (ORB)
16. Administering the JavaMail Service
17. Administering the Java Message Service (JMS)
18. Administering the Java Naming and Directory Interface (JNDI) Service
19. Administering Transactions
The following topics are addressed here:
Use the uptime subcommand in remote mode to display the length of time that the domain administration server (DAS) has been running since it was last started.
Remote subcommands require a running server.
Example 3-28 Displaying the DAS Uptime
This example displays the length of time that the DAS has been running.
asadmin> uptime Uptime: 1 Weeks, 4 days, 0 hours, 17 minutes, 14 seconds, Total milliseconds: 951434595 Command uptime executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help uptime at the command line.
GlassFish Server 3.1 requires Version 6 Java SE platform as the underlying virtual machine for the Java platform (Java Virtual Machine or JVM machine).
Note - Do not downgrade to an earlier Java version after a domain has been created with a newer JVM machine. If you must downgrade your JVM machine, downgrade it only for individual domains.
The Java SDK can be downloaded from the Java SE Downloads page.
Use the following format:
as-install/bin/asadmin start-domain domain-name
For a valid JVM installation, locations are checked in the following order:
If a legal JDK is not found, a fatal error occurs and the problem is reported back to you.
In particular, you might need to change the JAVA_HOME environment variable. For example, to change the JAVA_HOME variable, type:
as-install/bin/asadmin set "server.java-config.java-home=path-to-java-home"
Use the set subcommand in remote mode to change the administration port of a domain.
The HTTP port or the HTTPS port for administration of a domain is defined by the --adminport option of the create-domain(1) subcommand when the domain is created. If this port must be reallocated for another purpose, change the port on which the DAS listens for administration requests.
Remote subcommands require a running server.
Use the set(1) subcommand for this purpose.
$ asadmin set server-config.network-config.network-listeners.network-listener.admin-listener.port=new-port-number
The new value that you are setting for the port number.
Note - After you set the port number to its new value, running the list-domains subcommand incorrectly reports that the DAS is not running. The list-domains subcommand reports the correct state again only after you stop and restart the domain as explained in the steps that follow.
You must specify the old port number because the DAS is still listening for administration requests on this port. If you omit the port number, the command fails because the stop-domain subcommand attempts to contact the DAS through the new port number.
Note - Only the options that are required to complete this task are provided in this step. For information about all the options for controlling the behavior of the domain, see the stop-domain(1) help page.
$ asadmin --host host-name --port old-port-number stop-domain
The name of the host on which the DAS is running. If you run the stop-domain subcommand on the host where the DAS is running, you must specify the actual host name and not localhost. If you specify localhost, the stop-domain subcommand fails.
The value of administration port number of the domain before you changed it in the preceding step.
Note - Only the options that are required to complete this task are provided in this step. For information about all the options for controlling the behavior of the domain, see the start-domain(1) help page.
$ start-domain [domain-name]
The name of the domain to start. If only one domain subdirectory is contained in the domains directory, you may omit this option.
Example 3-29 Changing the Administration Port of a Domain
This example changes the administration port of the domain domain1 from 4848 to 4849. The DAS is running on the host xk01.example.com.
$ asadmin set server-config.network-config.network-listeners.network-listener.admin-listener.port=4849 server-config.network-config.network-listeners.network-listener.admin-listener.port=4849 Command set executed successfully. $ asadmin --host xk01.example.com --port 4848 stop-domain Waiting for the domain to stop .... Command stop-domain executed successfully. $ asadmin start-domain Waiting for domain1 to start ........................ Successfully started the domain : domain1 domain Location: /export/glassfish3/glassfish/domains/domain1 Log File: /export/glassfish3/glassfish/domains/domain1/logs/server.log Admin Port: 4849 Command start-domain executed successfully.
See Also
You can also view the full syntax and options of the subcommands by typing the following commands at the command line:
asadmin help create-domain
asadmin help set
asadmin help start-domain
asadmin help stop-domain