Sun GlassFishTM Enterprise Server v3 Prelude provides an environment for the development and deployment of Java applications and web services.
As an Enterprise Server administrator, your main responsibilities are to establish a secure Enterprise Server environment and to oversee the services, resources, and users that participate in that environment. Information and instructions on performing the associated tasks from the command line are provided in this document. Information and instructions for accomplishing the tasks by using the Administration Console are contained in the Administration Console online help.
The following topics are addressed here:
The command-line instructions in this guide are organized around the following administrative tasks:
Administering domains, resources, and system properties
Installing and updating add-on components by using the pkg command from the Update Center
Administering Java Virtual Machine (JVM) options and profilers
Starting and stopping Java DB and administering JDBC resources, connection pools, and drivers
Administering passwords, audit modules, and JSSE certificates
Administering authentication realms and users
Administering HTTP listeners and virtual servers
Configuring logging and viewing log files
Configuring monitoring and viewing monitoring data
Although not documented in this guide, the following tasks are often performed by administrators:
Assembling and deploying applications
Diagnosing and resolving problems
For the most part, you can perform the same tasks by using either the graphical Administration Console or the asadmin command-line utility, however, there are exceptions. Step-by-step instructions for using the Administration Console are provided in the Administration Console online help. Procedures for using the command-line utilities are provided in this guide and in the command-line help pages, which are similar to man pages.
Instructions for manually editing configuration files are provided when there is no way to accomplish the tasks by using the Administration Console or the asadmin utility.
Enterprise Server provides the following administration tools:
Instructions written for the Enterprise Server tools use standard UNIX® forward slashes (/) for directory path separators in commands and file names. If you are running Enterprise Server on a Microsoft Windows system, use backslashes (\) instead. For example:
The Administration Console is a browser-based utility that features an easy-to-navigate graphical interface that includes extensive online help for the administrative tasks.
You can display the help material for a page in the Administration Console by clicking the Help button on the page. The initial help page describes the functions and fields of the page itself. Associated task instructions can be accessed on additional pages by clicking a link in the See Also list.
To use the Administration Console, the domain administration server (DAS) must be running. Each domain has its own DAS, which has a unique port number. When Enterprise Server was installed, you chose a port number for the DAS, or used the default port of 4848. You also specified a user name and password if you did not choose anonymous login.
When specifying the URL for the Administration Console, use the port number for the domain to be administered. The format for starting the Administration Console in a web browser is http://hostname:port. For example:
If the Administration Console is running on the host where the Enterprise Server was installed, specify localhost for the host name. For example:
For Microsoft Windows, an alternative way to start the Enterprise Server Administration Console is by using the Start menu.
The asadmin utility is a command-line tool that invokes commands for identifying the operation or task that you want to perform. You can run asadmin commands either from a command prompt or from a script. Running asadmin commands from a script is helpful for automating repetitive tasks.
Not all asadmin command options are supported for this release of Enterprise Server. If you specify an unsupported option, a syntax error does not occur. Instead, the command runs successfully and the unsupported option is silently ignored.
The following topics are addressed here:
The asadmin(1M) help page explains the basics of how the asadmin command works. To display the help page for the asadmin utility, type asadmin without a subcommand.
You can display a help page for an asadmin command by typing the command name followed by the --help option. For example:
asadmin create-jdbc-resource --help
To display the help page for a remote command, Enterprise Server must be running.
Use the asadmin list-commands command to display the available commands. A collection of the asadmin help pages is available in HTML and PDF format in the Sun GlassFish Enterprise Server v3 Prelude Reference Manual.
To issue an asadmin command, go to the default as-install/bin directory and type the asadmin command and a subcommand. For example:
A list of the asadmin commands included in this release is contained in Appendix A, The asadmin Utility Commands.
Enterprise Server provides a set of image packaging system (IPS) tools for updating software on a deployed Enterprise Server. Typical updates include new releases of Enterprise Server, and new or revised Enterprise Server add-on components.
Update Tool is a graphical utility that you can either invoke in the Administration Console, or from the command line by using the updatetool command. A desktop Update Tool Notifier lets you know when updates are available and provides a direct means of applying the updates to your Enterprise Server.
Instructions for using the graphical versions of the Update Tool are contained in the Administration Console online help and the standalone Update Tool online help.
The pkg command is the command-line version of Update Tool.
Instructions for using the pkg command are contained in Chapter 3, Extending Enterprise Server.
The keytool utility is used to set up and work with Java Security Socket Extension (JSSE) digital certificates. See Administering JSSE Certificates for instructions on using keytool.
Java SE provides tools to connect to an MBean Server and view the MBeans registered with the server. JConsole is one such popular JMX Connector Client and is available as part of the standard Java SE distribution. See Connecting JConsole to Enterprise Server for instructions on implementing JConsole in the Enterprise Server environment.
The following configuration files are associated with Enterprise Server administration:
The bulk of the configuration information on Enterprise Server is stored in the domain.xml file. This file is the central repository for a given administrative domain and contains an XML representation of the Enterprise Server domain model. For details on the domain.xml file, see Sun GlassFish Enterprise Server v3 Prelude Administration Reference.
If you want to make configuration changes, you can use either the Administration Console or the asadmin utility. Either method is preferable to editing the configuration files directly, because direct editing is very prone to error and can have unintended results.
Configuration changes often require that you restart Enterprise Server for the changes to take effect. In other cases, changes are applied dynamically without restarting Enterprise Server.
When making any of the following configuration changes, you must restart the server for the changes to take effect:
Creating or deleting a resource or entity
Adding or deleting a component
Changing JVM options
Changing port numbers
Changing log handler elements
Managing HTTP services
Managing thread pools
Modifying the following JDBC connection pool properties:
JDBC driver vendor-specific properties
Modifying the following connector connection pool properties:
With dynamic configuration, changes take effect while the server is running. To make the following configuration changes, you do not need to restart the server:
Adding or removing JDBC, JMS, and connector resources and pools
Adding file realm users
Changing logging levels
Changing monitoring levels
Enabling and disabling resources and applications
Deploying, undeploying, and redeploying applications