JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

About Administering Domains

GlassFish Server Instances

Domains for Administering GlassFish Server

Domain Administration Server (DAS)

Creating, Logging In To, and Deleting a Domain

To Create a Domain

To Create a Domain From a Custom Template

To List Domains

To Log In to a Domain

To Delete a Domain

Starting and Stopping a Domain

To Start a Domain

To Stop a Domain

To Restart 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

To Suspend a Domain

To Resume a Domain

Setting Up Automatic Backups of a Domain

To Create a Backup Configuration

To List Backup Configurations

To Enable a Backup Configuration

To Disable a Backup Configuration

To Delete a Backup Configuration

To Create a Schedule

To List Schedules

To Delete a Schedule

Backing Up and Restoring a Domain

To Back Up a Domain

To Restore a Domain

To List Domain Backups

Re-Creating the Domain Administration Server (DAS)

To Migrate the DAS

Additional Domain Tasks

To Display Domain Uptime

To Switch a Domain to Another Supported Java Version

To Change the Administration Port of a Domain

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

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

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Additional Domain Tasks

The following topics are addressed here:

To Display Domain Uptime

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.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Display uptime by using the uptime(1) subcommand.

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.

To Switch a Domain to Another Supported Java Version

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.


  1. If you have not already done so, download the desired Java SDK (not the JRE) and install it on your system.

    The Java SDK can be downloaded from the Java SE Downloads page.

  2. Start the domain for which you are changing the JDK.

    Use the following format:

    as-install/bin/asadmin start-domain domain-name

    For a valid JVM installation, locations are checked in the following order:

    1. domain.xml (java-home inside java-config)
    2. asenv.conf (setting AS_JAVA="path to java home")

    If a legal JDK is not found, a fatal error occurs and the problem is reported back to you.

  3. If necessary, change the JVM machine attributes for the domain.

    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"

To Change the Administration Port of a Domain

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.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Set the port number to its new value.

    Use the set(1) subcommand for this purpose.

    $ asadmin set 
    server-config.network-config.network-listeners.network-listener.admin-listener.port=new-port-number
    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.


  3. Stop the domain, specifying the host on which the DAS is running and the old administration port number of the domain.

    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
    host-name

    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.

    old-port-number

    The value of administration port number of the domain before you changed it in the preceding step.

  4. Start the domain.

    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]
    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: