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

Initial Configuration Tasks

How Dotted Names Work for Configuration

Configuration Files

Impact of Configuration Changes

To Determine Whether the DAS or an Instance Requires Restart

Configuration Changes That Require Restart

Dynamic Configuration Changes

Changes That Affect Applications

Administration Tools

Administration Console

asadmin Utility

REST Interfaces

Update Tool

keytool Utility

Java Monitoring and Management Console (JConsole)

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

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

Configuration Tasks

Some configuration tasks must be performed directly after installation for your GlassFish Server environment to work as intended. For example, if you are using a database with GlassFish Server, you need to set up database connectivity right away.

Some configuration situations are ongoing and will require you to make changes many times during the life of your installation. You can use either the Administration Console or the asadmin utility to modify the configuration. Changes are automatically applied to the appropriate configuration file.

The following topics are addressed here:

Initial Configuration Tasks

This section maps the common configuration tasks to the command–line procedures in this guide. In some situations, the resource or service is automatically enabled and your configuration tasks involve adjusting or changing the default settings to suit your specific needs.

The following resources and services frequently require configuration immediately after installation:

System Properties

See Administering System Properties.

Domains

The initial domain1 is created during installation. Additional configuration tasks might include such tasks as configuring additional domains or setting up automatic restart. See Chapter 3, Administering Domains.

JVM

The initial tasks for configuring the JVM include creating JVM options and profilers. See Chapter 4, Administering the Virtual Machine for the Java Platform.

Logging

By default, logging is enabled, so basic logging works without additional configuration. However, you might want to change log levels, property values, or the location of log files. See Chapter 7, Administering the Logging Service.

Monitoring

By default, the monitoring service is enabled. However, monitoring for the individual modules is not enabled, so your first monitoring task is to enable monitoring for the modules that you want to monitor. See Chapter 8, Administering the Monitoring Service.

Life Cycle Modules

See Chapter 10, Administering Life Cycle Modules.

Security
Database Connectivity

The initial tasks involved in configuring GlassFish Server to connect to the Java DB database include creating a Java Database Connectivity (JDBC) connection pool, creating a JDBC resource, and integrating a JDBC driver. See Chapter 12, Administering Database Connectivity.

EIS Connectivity

The initial tasks involved in configuring GlassFish Server to connect to an enterprise information system (EIS) include creating a connector connection pool, creating a connector resource, editing a resource adapter configuration, creating a connector security map, creating a connector work security map, and creating an administered object (if needed). See Chapter 13, Administering EIS Connectivity.

Internet Connectivity

The initial tasks involved in making deployed web applications accessible by internet clients include creating HTTP network listeners and virtual servers, and configuring the HTTP listeners for SSL (if needed). See Chapter 14, Administering Internet Connectivity.

Object Request Broker (ORB)

An initial configuration task might involve creating an IIOP listener. See Chapter 15, Administering the Object Request Broker (ORB).

JavaMail Service

An initial configuration task might involve creating a JavaMail resource. See Chapter 16, Administering the JavaMail Service.

Java Message Service (JMS)

Initial configuration tasks might include creating a physical destination, creating connection factories or destination resources, creating a JMS host (if the default JMS host is not adequate), adjusting connection pool settings (if needed), and configuring resource adapters for JMS. See Chapter 17, Administering the Java Message Service (JMS).

JNDI Service

An initial configuration task might involve creating a JNDI resource. See Chapter 18, Administering the Java Naming and Directory Interface (JNDI) Service.

Information and instructions for accomplishing the tasks by using the Administration Console are contained in the Administration Console online help.

How Dotted Names Work for Configuration

After the initial configuration is working, you will continue to manage ongoing configuration for the life of your GlassFish Server installation. You might need to adjust resources to improve productivity, or issues might arise that require settings to be modified or defaults to be reset. In some situations, an asadmin subcommand is provided for updating, such as the update-connector-work-security-map subcommand. However, most updating is done by using the list, get, and set subcommands with dotted names. For detailed information about dotted names, see the dotted-names(5ASC) help page.


Note - Dotted names also apply to monitoring, but the method is different. For information on using dotted names for monitoring, see How the Monitoring Tree Structure Works.


The general process for working with configuration changes on the command line is as follows:

  1. List the modules for the component of interest.

    The following single mode example uses the | (pipe) character and the grep command to narrow the search:

    asadmin list "*" | grep http | grep listener

    Information similar to the following is returned:

    configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1
    configs.config.server-config.network-config.network-listeners.network-listener.http-listener-2
    configs.config.server-config.network-config.protocols.protocol.admin-listener.http
    configs.config.server-config.network-config.protocols.protocol.admin-listener.http.file-cache
    configs.config.server-config.network-config.protocols.protocol.http-listener-1
    configs.config.server-config.network-config.protocols.protocol.http-listener-1.http
    configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.file-cache
    configs.config.server-config.network-config.protocols.protocol.http-listener-2
    configs.config.server-config.network-config.protocols.protocol.http-listener-2.http
    configs.config.server-config.network-config.protocols.protocol.http-listener-2.http.file-cache
    configs.config.server-config.network-config.protocols.protocol.http-listener-2.ssl
  2. Get the attributes that apply to the module you are interested in.

    The following multimode example gets the attributes and values for http-listener-1:

    asadmin> get server-config.network-config.network-listeners.network-listener.http-listener-1.* 

    Information similar to the following is returned:

    server.http-service.http-listener.http-listener-1.acceptor-threads = 1
    server.http-service.http-listener.http-listener-1.address = 0.0.0.0
    server.http-service.http-listener.http-listener-1.blocking-enabled = false
    server.http-service.http-listener.http-listener-1.default-virtual-server = server
    server.http-service.http-listener.http-listener-1.enabled = true
    server.http-service.http-listener.http-listener-1.external-port =
    server.http-service.http-listener.http-listener-1.family = inet
    server.http-service.http-listener.http-listener-1.id = http-listener-1
    server.http-service.http-listener.http-listener-1.port = 8080
    server.http-service.http-listener.http-listener-1.redirect-port =
    server.http-service.http-listener.http-listener-1.security-enabled = false
    server.http-service.http-listener.http-listener-1.server-name =
    server.http-service.http-listener.http-listener-1.xpowered-by = true
  3. Modify an attribute by using the set subcommand.

    This example sets the security-enabled attribute of http-listener-1 to true:

    asadmin> set server.http-service.http-listener.http-listener-1.security-enabled = true

Configuration Files

The bulk of the configuration information about GlassFish Server resources, applications, and instances is stored in the domain.xml configuration file. This file is the central repository for a given administrative domain and contains an XML representation of the GlassFish Server domain model. The default location for the domain.xml file is as-install/domains/domain-name/config.


Note - GlassFish Server maintains a backup of the domain.xml file that is named domain.xml.bak. The purpose of this file is solely to enable GlassFish Server to start a domain if the domain.xml file cannot be read. Do not modify or delete the domain.xml.bak file and do not use this file for any other purpose.


The logging.properties file is used to configure logging levels for individual modules. The default logging.properties file is located in the same directory as the domain.xml file. For further information on the logging.properties file, see Logging Properties.

The asenv.conf file is located in the as-install/config directory. Its purpose is to store the GlassFish Server environment variables, such as the installation location of the database, Message Queue, and so on.


Note - Changes are automatically applied to the appropriate configuration file. Do not edit the configuration files directly. Manual editing is prone to error and can have unexpected results.


Impact of Configuration Changes

Some configuration changes require that you restart the DAS or GlassFish Server instances for the changes to take effect. Other changes are applied dynamically without requiring that the DAS or instances be restarted. The procedures in this guide indicate when a restart is required. GlassFish Server enables you to determine whether the DAS or an instance must be restarted to apply configuration changes.

Some changes to resources or connection pools affect the applications that use the resources or connection pools. These changes do not require restart. However, any applications that use the resources or connection pools must be disabled and re-enabled or redeployed for the change to take effect.

The following topics are addressed here:

To Determine Whether the DAS or an Instance Requires Restart

  1. Ensure that the DAS is running.

    To obtain information about the DAS or an instance, a running server is required.

  2. Do one of the following:
    • To determine if the DAS requires restart, list the domains in your GlassFish Server installation.

      Use the list-domains(1) subcommand for this purpose.

      asadmin> list-domains [--domaindir domain-dir]
      domain-dir

      The directory that contains the directories in which individual domains' configuration is stored. The default is as-install/domains, where as-install is the base installation directory of the GlassFish Server software.

      If the DAS requires restart, a statement that restart is required is displayed.

    • To determine if an instance requires restart, list information about the instance.

      Use the list-instances(1) subcommand for this purpose.

      asadmin> list-instances instance-name
      instance-name

      The name of the instance for which you are listing information.

      If the instance requires restart, one of the following pieces of information is displayed:

      • A statement that restart is required

      • A list of configuration changes that are not yet applied to the instance

Example 1-1 Determining if the DAS Requires Restart

This example determines that the DAS for the domain domain1 requires restart to apply configuration changes.

asadmin> list-domains
domain1 running, restart required to apply configuration changes
Command list-domains executed successfully.

Example 1-2 Determining if an Instance Requires Restart

This example determines that the instance pmd-i1 requires restart to apply configuration changes.

asadmin> list-instances pmd-i1
pmd-i1   running;  requires restart  
Command list-instances 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.

Configuration Changes That Require Restart

The following configuration changes require restart for the changes to take effect:

Dynamic Configuration Changes

With dynamic configuration, changes take effect while the DAS or instance is running. The following configuration changes do not require restart:

Changes That Affect Applications

Some changes to resources or connection pools affect the applications that use the resources or connection pools. These changes do not require restart. However, any applications that use the resources or connection pools must be disabled and re-enabled or redeployed for the change to take effect.


Note - If you do not know which applications use the changed resources or connection pools, you can apply these changes by restarting the clusters orGlassFish Server instances to which applications are deployed. However, to minimize the disruption to the services that your applications provide, avoid restarting clusters or instances to apply these changes if possible.


The following changes affect applications: