Sun GlassFish Enterprise Server v3 Prelude Administration Guide

Additional Administrative Tasks

The following topics are addressed here:

Listing Various System Elements

Various list commands can be useful in administering your system.

ProcedureTo List Applications

The remote list-applications command enables you 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 commands require a running server.

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


Example 2–12 Listing Applications

The following example command lists the web applications on localhost:


asadmin list-applications --type web

Information similar to the following is displayed:


hellojsp <web>
Command list-applications executed successfully.

See Also

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

ProcedureTo List Commands

The remote list-commands command enables you to list the deployed asadmin commands. You can specify that only remote commands or only local commands are listed. By default, this command displays a list of local commands followed by a list of remote commands.

  1. Ensure that the server is running.

    Remote commands require a running server.

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


Example 2–13 Listing Commands

The following example command lists only local commands:


asadmin list-commands --localonly

Information similar to the following is displayed:


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

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

ProcedureTo List Containers

The remote list-containers command enables you to list application containers.

  1. Ensure that the server is running.

    Remote commands require a running server.

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


Example 2–14 Listing Containers

The following example command lists the containers on localhost:


asadmin list-containers

Information similar to the following is displayed:


List all known application containers
Container : connectors
    properties=(ContractProvider=connectors)
Container : jpa
    properties=(ContractProvider=jpa)
Container : web
    properties=(ContractProvider=web)
Container : jruby
    properties=(ContractProvider=jruby)
Container : security
    properties=(ContractProvider=security)
Command list-containers executed successfully.

See Also

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

ProcedureTo List Modules

The remote list-modules command enables you to list the modules that are accessible to the Enterprise Server module subsystem. The status of each module is included. Possible statuses include NEW and READY.

  1. Ensure that the server is running.

    Remote commands require a running server.

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


Example 2–15 Listing Modules

The following example command 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:/prelude/v3_prelude_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.prelude-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:/prelude/v3_prelude_release/distributions/web/target/glass
fish/modules/tiger-types-osgi.jar.
.
.
.
Command list-modules executed successfully.

See Also

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

ProcedureTo Add Resources

The remote add-resources command enables you to create the resources named in the specified XML file.

The XML file must reside in the as-install/domains/domain1/config directory. If you specify a relative path or simply provide the name of the XML file, this command will prepend as-install/domains/domain1/config to this operand.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Add resources from an XML file by using the add-resources(1) command.


Example 2–16 Adding Resources

The following example command creates resources using the contents of the resource.xml file on localhost:


asadmin add-resources c:\tmp\resource.xml

Information similar to the following is displayed:


Command : JDBC resource jdbc1 created successfully.
Command : JDBC connection pool poolA created successfully.
Command add-resources executed successfully.

See Also

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

ProcedureTo Display the Enterprise Server Version

The remote version command enables you to display information on the Enterprise Server version for a particular server. If the command 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 commands require a running server.

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


Example 2–17 Displaying Version Information

The following example command displays the version of Enterprise Server on localhost:


asadmin version

Information similar to the following is displayed:


Version = GlassFish v3 Prelude
Command version executed successfully.

See Also

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