1. Overview of GlassFish Server Administration
Default Settings and Locations
Instructions for Administering GlassFish Server
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 Run a Set of asadmin Subcommands From a File
Administering System Properties
To Add Resources From an XML File
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 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
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 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.
Remote subcommands require a running server.
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.
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.
Remote subcommands require a running server.
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.
Use the list-containers subcommand in remote mode to list application containers.
Remote subcommands require a running server.
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.
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.
Remote subcommands require a running server.
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.
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.
Remote subcommands require a running server.
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.
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.
Remote subcommands require a running server.
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.
Use the show-component-status subcommand in remote mode to get the status (either enabled or disabled) of the specified deployed component.
Remote subcommands require a running server.
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.