Sun Java System Application Server Platform Edition 8.2 Administration Guide

Chapter 1 Getting Started

This chapter describes the Sun JavaTM System Application Server and introduces basic administration tasks. This chapter contains following sections:

About the Sun Java System Application Server

What is the Application Server?

The Application Server provides a robust J2EE platform for the development, deployment, and management of enterprise applications. Key features include transaction management, performance, scalability, security, and integration. The Application Server supports services from Web publishing to enterprise-scale transaction processing, while enabling developers to build applications based on JavaServer Pages (JSPTM), Java servlets, and Enterprise JavaBeansTM(EJBTM) technology.

The Application Server Platform Edition is free for development, production deployment, and redistribution. For more information on redistribution, please visit

Application Server Architecture

This section describes Figure 1–1, which shows the high-level architecture of the Application Server.

Figure 1–1 Application Server Architecture

Figure shows high-level architecture, including containers,
services, tools, and communication with outside systems such as databases.

Access to External Systems

The J2EE platform enables applications to access systems that are outside of the application server. Applications connect to these systems through objects called resources. One of the responsibilities of an administrator is resource configuration. The J2EE platform enables access to external systems through the following APIs and components:

Tools for Administration

Admin Console

The Admin Console is a browser-based tool that features an easy-to-navigate interface and online help. This manual provides step-by-step instructions for using the Admin Console. The administration server must be running to use the Admin Console.

When the Application Server was installed, you chose a port number for the server, or used the default port of 4848. You also specified a user name and master password.

To start the Admin Console, in a web browser type:


For example:

If the Admin Console is running on the machine on which the Application Server was installed, specify localhost for the host name.

On Windows, start the Application Server Admin Console from the Start menu.

The installation program creates the default administrative domain (named domain1) with the default port number 4848, as well as an instance separate from the domain administration server (DAS). After installation, additional administration domains can be created. Each domain has its own domain administration server, which has a unique port number. When specifying the URL for the Admin Console, be sure to use the port number for the domain to be administered.

asadmin Utility

The asadmin utility is a command-line tool. Use the asadmin utility and the commands associated with it to perform the same set of tasks that can be performed in the Admin Console. For example, start and stop domains, configure the server, and deploy applications.

Use these commands either from a command prompt in the shell, or call them from other scripts and programs. Use these commands to automate repetitive administration tasks.

To start the asadmin utility:

$ asadmin

To list the commands available within asadmin:

asadmin> help

It is also possible to issue an asadmin command at the shell’s command prompt:

$ asadmin help

To view a command’s syntax and examples, type help followed by the command name. For example:

asadmin> help create-jdbc-resource

The asadmin help information for a given command displays the UNIX man page of the command. These man pages are also available in HTML format.

Application Server Management Extension (AMX)

The Application Server Management eXtension is an API that exposes all of the Application Server configuration and monitoring JMX managed beans as easy-to-use client-side dynamic proxies implementing the AMX interfaces.

For more information on using the Application Server Management Extension, see the JMX chapter in the Application Server Developer's Guide.

Application Server Configuration

Configuring the Application Server

Application Server domains are logical or physical units created to help the administrator manage a system configuration. A domain is broken down into smaller units including instances and node agents. A server instance is a single Java Virtual Machine (JVM) that runs the Application Server on a single physical machine. Each domain has one or more instances. A domain must also have at least one associated node agent for the instance to function properly. Domains can be grouped together to create a cluster. Clusters allow the administrator to manage groups of hardware and software.

Creating a Domain

Domains are created using the create-domain command. The following example command creates a domain named mydomain. The administration server listens on port 1234 and the administrative user name is hanan. The command prompts for the administrative and master passwords.

$ asadmin create-domain --adminport 80 --adminuser hanan mydomain

To start the Admin Console for mydomain domain, in a browser, enter the following URL:


For the preceding create-domain example, the domain’s log files, configuration files, and deployed applications now reside in the following directory:


To create the domain’s directory in another location, specify the --domaindir option. For the full syntax of the command, type asadmin help create-domain.

Deleting a Domain

Domains are deleted using the asadmin delete-domain command. Only the operating system user (or root) who can administer the domain can execute this command successfully. To delete a domain named mydomain, for example, type the following command:

$ asadmin delete-domain mydomain

Listing Domains

The domains created on a machine can be found using the asadmin list-domains command. To list the domains in the default domain-root-dir directory, type this command:

$ asadmin list-domains

To list domains that were created in other directories, specify the --domaindir option.

Restarting the Server or Domain

Restarting the server is the same as restarting the domain. To restart the domain or server, stop and start the domain.

Application Server Instances

About Application Server Instances

The Application Server creates one application server instance, called server at the time of installation. You can delete the server instance and create a new instance with a different name if you prefer.

Each Application Server instance has its own J2EE configuration, J2EE resources, application deployment areas, and server configuration settings. Changes to one application server instance have no effect on other application server instances. You can have many application server instances within one administrative domain.

For many users, one application server instance meets their needs. However, depending upon your environment, you might want to create one or more additional application server instances. For example, in a development environment you can use different application server instances to test different Application Server configurations, or to compare and test different application deployments. Because you can easily add or delete an application server instance, you can use them to create temporary “sandbox” areas to experiment with while developing.

In addition, for each application server instance you can also create virtual servers. Within a single installed application server instance you can offer companies or individuals domain names, IP Addresses, and some administration capabilities. For the users, it is almost as if they have their own web server, without the hardware and basic server maintenance. These virtual servers do not span application server instances. For more information about virtual servers, see To configure the JVM general settings.

In operational deployments, for many purposes you can use virtual servers instead of multiple application server instances. However, if virtual servers do not meet your needs, you can also use multiple application server instances.

An Application Server instance is not started automatically. Once you start an instance, the instance runs until you stop it. When you stop an application server instance, it stops accepting new connections, then waits for all outstanding connections to complete. If your machine crashes or is taken offline, the server quits and any requests it was servicing may be lost.

Viewing General Server Information

From the General Tab you can perform the following tasks:

In addition, you can select the following tabs to perform these additional tasks:

Application Server Advanced Settings

The Application Server Advanced settings allow you to set general properties for deploying applications. These properties enable you to ensure and monitor that changes to deployed applications are detected and the modified classes reloaded.

Setting Applications Configurations

If dynamic reloading is enabled, the server periodically checks for changes in the files of the deployed application and automatically reloads the application with the changes. Dynamic reloading is useful in a development environment because it allows code changes to be tested quickly. In a production environment, however, dynamic reloading may degrade performance.

To configure dynamic reloading from the Applications Configuration page, configure the following:

ProcedureTo configure auto deploy settings

The auto deploy feature enables you to deploy a prepackaged application or module by copying it to the domain-dir/autodeploy directory.

For example, copy a file named hello.war to the domain-dir/autodeploy directory. To undeploy the application, remove the hello.war file from the autodeploy directory.

  1. Go to the Applications Configuration page.

  2. Enable or disable auto deploy by selecting or deselecting the Enabled checkbox.

  3. In the Auto Deploy Poll Interval field, specify how often the server checks the auto deploy directory for application or module files.

    Changing the poll interval does not affect the amount of time it takes to deploy an application or module.

  4. In the Auto Deploy directory, if you specify the directory where you build your application, then you won’t have to copy the file to the default auto deploy directory.

    The default is a directory called domain-dir/autodeploy.

  5. To run the verifier before deployment, select the Verifier Enabled checkbox.

    The verifier examines the structure and content of the file. Verification of large applications is often time-consuming.

  6. To precompile JSP pages, select the JSPs checkbox.

    If you do not select this checkbox, the JSP pages are compiled at runtime when they are first accessed. Because compilation is often time-consuming, in a production environment select this checkbox.

  7. Click the Add Property button to specify additional settings.

Setting Domain Attributes

The following domain attributes properties are available.

Table 1–1 Domain Attributes values




Directory where the application server is installed. 


Top level directory for a server instance. 


Name of the host (machine). 


.J2SE installation directory. 


Library directory of the Sun Java System Message Queue software. 


Name of the configuration being used by a server instance. 


Name of the server instance. This property is not available for the default-config but can be used for customized configurations. 


Name of the cluster. This property is only set on the clustered server instances. This property is not available for the default-config but can be used for customized configurations. 


Name of the domain. This property is not available for the default-config but can be used for customized configurations. 

Instance Specific Configuration Properties

The instance specific Configuration Properties override the values for this instance.

Note –

The default values are defined in the configuration bound to the instance.

ProcedureTo revert the value back to the default value

  1. Remove the override value.

  2. Click Save.

    If no override value is set, the default value is used.

ProcedureTo add instance properties

  1. Click the Add Property button to specify additional settings.

    The following property attribute name/value pairs for configuring the resource are available:




    This port is used to listen for HTTP requests. This property specifies the port number for http-listener-1. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. 


    This port is used to listen for HTTPS requests. This property specifies the port number for http-listener-2. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. 


    This property specifies which ORB listener port for IIOP connections orb-listener-1 listens on. 


    This port is used for secure IIOP connections. 


    This property specifies the port number on which the JMX connector listens. Valid values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. 


    This property specifies which ORB listener port for IIOP connections the IIOP listener called SSL_MUTUALAUTH listens on. 

ProcedureTo delete properties

  1. Click the for the property you wish to delete.

  2. Click the Delete Property button.

Recovering Transactions

Transactions might be incomplete either because the server crashed or a resource manager crashed. It is essential to complete these stranded transactions and recover from the failures. Application Server is designed to recover from these failures and complete the transactions upon server startup.

If the selected server is running, then recovery will be done by the same server. If the selected server is not running, then the selected Destination Server will do the recovery.

Configuration Changes

Changing Application Server Configuration

When making any of these configuration changes, restart the server for the changes to take effect:

For instructions, see Restarting the Server or Domain.

With dynamic configuration, most changes take effect while the server is running. To make the following configuration changes, do NOT restart the server:

Note that the asadmin reconfig command has been deprecated and is no longer necessary. Configuration changes are applied to the server dynamically.

Ports in the Application Server

The following table describes the port listeners of the Application Server.

Table 1–2 Application Server Listeners that Use Ports


Default Port Number  


Administrative server 


A domain’s administrative server is accessed by the Admin Console and the asadmin utility. For the Admin Console, specify the port number in the URL of the browser. When executing an asadmin command remotely, specify the port number with the --port option.



The Web server listens for HTTP requests on a port. To access deployed Web applications and services, clients connect to this port. 



Web applications configured for secure communications listen on a separate port. 



Remote clients of enterprise beans (EJB components) access the beans through the IIOP listener. 



Another port is used by the IIOP listener configured for secure communications. 

IIOP, SSL and mutual authentication 


Another port is used by the IIOP listener configured for mutual (client and server) authentication. 

ProcedureTo view port numbers

  1. In the tree component, select an instance under the Standalone Instances node.

  2. Select the Properties tab.

  3. On the Instance Specific page, the default port numbers are identified. It is possible to set the configuration to override these values.

ProcedureTo change the Administrative Server port

  1. In the tree component, expand the Configurations node.

  2. Expand the server-config (Admin Config) node.

  3. Expand the HTTP Service node.

  4. Expand the HTTP Listeners node.

  5. Select the admin-listener node.

  6. On the Edit HTTP Listener page, change the value of the Listener Port field.

  7. Restart the server.

ProcedureTo change an HTTP port

  1. In the tree component, expand the HTTP Service node.

  2. Expand the HTTP Listeners node.

  3. Select the HTTP listener whose port number you want to change.

  4. On the Edit HTTP Listener page, change the value of the Listener Port field.

  5. Click Save.

  6. Restart the server.

ProcedureTo change an IIOP port

  1. In the tree component, expand the Configurations node.

  2. Expand the server-config (Admin Config) node.

  3. Expand the ORB node.

  4. Expand the IIOP Listeners node.

  5. Select the listener whose port number you want to change.

  6. On the Edit IIOP Listener page, change the value of the Listener Port field.

  7. Click Save.

  8. Restart the server.

ProcedureTo configure a JMX connector using the Admin Service

Use the Admin Service to configure a JSR-160 compliant remote JMX connector, which handles communication between the domain administration server and the node agents, which manage server instances on a host machine, for remote server instances.

The Admin Service determines whether the server instance is a regular instance, a domain administration server (DAS), or a combination. A DAS is similar to a J2EE server instance, except that user applications and resources are not deployed to a DAS, though it is capable of serving user application requests. The only significant difference between a DAS and a J2EE Server Instance is that the former can not be a part of a cluster, the homogeneous unit of server instances. In the Platform Edition, there is only one server instance, and it is a combination.

  1. Select Configurations from the tree.

  2. Select Admin Service from the tree.

  3. From the Type drop-down menu, select what you want the Admin service to configure: DAS , DAS and server, or server. Selecting DAS and server is the same as selecting DAS.

  4. In the JMX Connector Name field, enter the name of the JMX connector used internally. The name of the connector is system.

ProcedureTo edit the JMX connector configuration

With the Edit JMX Connector screen, you can edit the configuration of the JSR–160 compliant JMX Connector.

  1. Select Configurations from the tree.

  2. Expand the Admin Service node and click system, which is the JMX connector used internally.

  3. Enter the port of the JMX connector server.

    The JMX service URL is a function of the protocol, port, and address, as defined by the JSR–160 1.0 Specification.

  4. Enter the protocol that this JMX connector should support.

    The Application Server version 8.2 supports the rmi_jrmp protocol only.

  5. In the Realm Name field, enter the name that represents the special administrative realm.

    All authentication is handled by this realm.

  6. Select the Enabled checkbox to indicate that transport layer security should be used in the JMX connector.

Changing the J2SE Software

The Application Server relies on the Java 2 Standard Edition (J2SETM) software. When the Application Server was installed, the directory for the J2SE software was specified. For instructions on changing the J2SE software, see To configure the JVM general settings.

Using Online Help

The Admin Console’s online help is context-sensitive: When clicking the Help link in the upper right corner, the help browser window displays a topic related to the current Admin Console page. If the current page has no help information, the Using Online Help topic is displayed.

The online help includes conceptual topics that are not context-sensitive. To view one of these topics, select it from the table of contents in the help browser window.

ProcedureTo go back to the previous help screen

  1. From within the help browser window, right-click to display a selection menu.

  2. Select Back.

Further Information