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

Using the asadmin Utility

Path to the asadmin Utility

asadmin Utility Syntax

Subcommands of the asadmin Utility

asadmin Utility Options and Subcommand Options

Operands of asadmin Utility Subcommands

To Run an asadmin Utility Subcommand in Single Mode

To Display Help Information for the asadmin Utility or a Subcommand

To Start a Multimode Session

To End a Multimode Session

To Run a Set of asadmin Subcommands From a File

Administering System Properties

To Create System Properties

To List System Properties

To Delete a System Property

Administering Resources

To Add Resources From an XML File

Listing Various System Elements

To Display the GlassFish Server Version

To List Applications

To List Containers

To List Modules

To List Subcommands

To List Timers

To Show Component Status

Using REST Interfaces to Administer GlassFish Server

Using REST URLs to Administer GlassFish Server

REST URLs to Resources for Configuration and Monitoring Objects

REST URLs for Accessing the Log File

Using REST Resource Methods to Administer GlassFish Server

To Determine the Methods and Method Parameters That an Object in the Tree Supports

To Retrieve Data for an Object in the Tree

To Add an Object to the Tree

To Update an Object in the Tree

To Delete an Object From the Tree

Resources for asadmin Subcommands That Perform Non-CRUD Operations

Securing GlassFish Server REST Interfaces

Setting Up Basic Authentication Over a Secure Connection

To Secure REST Interfaces by Using Session Tokens

Formats for Resource Representation of Configuration Objects

JSON Resource Representation for Configuration Objects

XML Resource Representation for Configuration Objects

HTML Resource Representation for Configuration Objects

Formats for Resource Representation of Monitoring Objects

JSON Resource Representation for Monitoring Objects

XML Resource Representation for Monitoring Objects

HTML Resource Representation for Monitoring Objects

Formats for Resource Representation of Log File Details

JSON Resource Representation for Log File Details

XML Resource Representation for Log File Details

Supported Content Types in Requests to REST Resources

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

Listing Various System Elements

The following topics are addressed here:

To Display the GlassFish Server Version

Use the version subcommand in remote mode to display information about the GlassFish Server version for a particular server. If the subcommand cannot communicate with the server by using the specified login (user/password) and target (host/port) information, then the local version is displayed along with a warning message.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

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

Example 2-14 Displaying Version Information

This example displays the version of GlassFish Server on the local host.

asadmin> version
Version = Oracle GlassFish Server 3.0.1 (build 19)
Command version executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help version at the command line.

To List Applications

Use the list-applications subcommand in remote mode to list the deployed Java applications. If the --type option is not specified, all applications are listed.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List applications by using the list-applications(1) subcommand.

Example 2-15 Listing Applications

This example lists the web applications on localhost.

asadmin> list-applications --type web
hellojsp <web>
Command list-applications executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-applications at the command line.

To List Containers

Use the list-containers subcommand in remote mode to list application containers.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List containers by using the list-containers(1) subcommand.

Example 2-16 Listing Containers

This example lists the containers on localhost.

asadmin> list-containers
List all known application containers
Container : grizzly
Container : ejb
Container : webservices
Container : ear
Container : appclient
Container : connector
Container : jpa
Container : web
Container : security
Container : webbeans
Command list-containers executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-containers at the command line.

To List Modules

Use the list-modules subcommand in remote mode to list the modules that are accessible to the GlassFish Server module subsystem. The status of each module is included. Possible statuses include NEW and READY.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List modules by using the list-modules(1) subcommand.

Example 2-17 Listing Modules

This example lists the accessible modules.

asadmin> list-modules

Information similar to the following is displayed (partial output):

List Of Modules
Module : org.glassfish.web.jstl-connector:10.0.0.b28
    properties=(visibility=public,State=READY,Sticky=true)
    Module Characteristics : List of Jars implementing the module
        Jar : file:/C:/Preview/v3_Preview_release/distributions/web/target/glass
fish/modules/web/jstl-connector.jar
    Module Characteristics : List of imported modules
    Module Characteristics : Provides to following services
Module : org.glassfish.admingui.console-common:10.0.0.b28
    properties=(visibility=public,State=NEW,Sticky=true)
Module : org.glassfish.admin.launcher:10.0.0.b28
    properties=(visibility=public,State=NEW,Sticky=true)
Module : org.glassfish.external.commons-codec-repackaged:10.0.0.b28
    properties=(visibility=public,State=NEW,Sticky=true)
Module : com.sun.enterprise.tiger-types-osgi:0.3.32.Preview-b28
    properties=(visibility=public,State=READY,Sticky=true)
    Module Characteristics : List of imported modules
    Module Characteristics : Provides to following services
    Module Characteristics : List of Jars implementing the module
        Jar : file:/C:/Preview/v3_Preview_release/distributions/web/target/glass
fish/modules/tiger-types-osgi.jar.
...
Command list-modules executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-modules at the command line.

To List Subcommands

Use the list-commands subcommand in remote mode to list the deployed asadmin subcommands. You can specify that only remote subcommands or only local subcommands are listed. By default, this subcommand displays a list of local subcommands followed by a list of remote subcommands.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List subcommands by using the list-commands(1) subcommand.

Example 2-18 Listing Subcommands

This example lists only local subcommands.

asadmin> list-commands --localonly
create-domain
delete-domain
list-commands
list-domains
login
monitor
start-database
start-domain
stop-domain
stop-database
version
Command list-commands executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-commands at the command line.

To List Timers

The timer service is a persistent and transactional notification service that is provided by the enterprise bean container and is used to schedule notifications or events used by enterprise beans. All enterprise beans except stateful session beans can receive notifications from the timer service. Persistent timers set by the service are not destroyed when the server is shut down or restarted.

Use the list-timers subcommand in remote mode to list the persistent timers owned by a specific server instance. You can use this information to decide whether to do a timer migration, or to verify that a migration has been completed successfully.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List timers by using thelist-timers(1) subcommand.

Example 2-19 Listing Timers

This example lists the timers in a particular standalone server instance. There is one currently active timer set.

asadmin> list-timers server
1
The list-timers command was executed successfully.

To Show Component Status

Use the show-component-status subcommand in remote mode to get the status (either enabled or disabled) of the specified deployed component.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Show component status by using the show-component-status(1) subcommand.

Example 2-20 Showing Status of a Component

This example shows the status of the MEjbApp component.

asadmin> show-component-status MEjbApp
Status of MEjbApp is enabled
Command show-component-status executed successfully.