Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Application Server 8 2004Q4 Beta Platform Edition 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 (JSP™), Java servlets, and Enterprise JavaBeans™ (EJB™) technology.

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

http://www.sun.com/software/products/appsrvr/appsrvr_oem.html

Application Server Architecture

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

Containers

A container is a runtime environment that provides services such as security and transaction management to J2EE components. Figure 1-1 shows the two types of J2EE containers: Web and EJB. Web components, such as JSP pages and servlets, run within the Web container. Enterprise beans, the components of EJB technology, run within the EJB container.

Client Access

At runtime, browser clients access Web applications by communicating with the Web server via HTTP, the protocol used throughout the internet. The HTTPS protocol is for applications that require secure communication. Enterprise bean clients communicate with the Object Request Broker (ORB) through the the IIOP or IIOP/SSL (secure) protocols. The Application Server has separate listeners for the HTTP, HTTPS, IIOP, and IIOP/SSL protocols. Each listener has exclusive use of a specific port number.

Web Services

On the J2EE platform, it is possible to deploy a Web application that provides a Web service implemented by Java API for XML-Based RPC (JAX-RPC). A J2EE application or component can also be a client to other Web services. Applications access XML registries through the Java API for XML Registries (JAXR).

Services for Applications

The J2EE platform was designed so that the containers provide services for applications. Figure 1-1 shows the following services:

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:

Server Administration

The lower right-hand corner of Figure 1-1 shows some of the tasks performed by the administrator of the Application Server. For example, an administrator deploys (installs) applications and monitor the server's performance. Theses tasks are performed with the administration tools provided by the Application Server. See the section Tools for Administration.

application server architecture

Figure 1-1 Application Server Architecture

Administrative Domains

Administrative domains provide a basic security structure whereby different administrators can administer specific groups (domains) of application server instances. By grouping the server instances into separate domains, different organizations and administrators can share a single Application Server installation. Each domain has its own configuration, log files, and application deployment areas that are independent of other domains. If the configuration is changed for one domain, the configurations of other domains are not affected.

In an Admin Console session, it is possible to configure and manage a multiple domains. Each domain has its own Domain Administration Server (DAS), which has a unique port number. Specify the port number in the URL of your browser to run the Admin Console. Each administrative domain can have multiple application server instances. However, an application server instance can belong to just one domain. When the Application Server is installed, an administrative domain named domain1 is automatically created.

Application Server Instances

Application server instances form the basis of an application server deployment. A server instance is a single Java Virtual Machine (JVM) that runs the Application Server on a single physical machine. Each instance belongs to a single domain and has its own directory structure, configuration, and deployed applications. Each server instance also includes the J2EE platform web and EJB containers. Figure 1-2 shows an application server instance in detail. The application server instance is a building block in the clustering, load balancing, and session persistence features of the Application Server Enterprise Edition.

application server architecture

Figure 1-2 Sun Java System Application Server Instance

Tools for Administration

The Application Server includes two administrative tools:

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:

http://hostname:port

For example:

http://kindness.sun.com:4848

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 Admin Console from the Start menu by choosing Programs -> Sun Microsystems -> J2EE 1.4 SDK -> Admin Console.

The installation program creates the default administrative domain (named domain1) with the default port number 4848. After installation, additional administrative 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.

The 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.

Configuration Changes and Restarting the Server

To make the following configuration changes, restart the server for the changes to take effect:

For instructions, see Restarting the Server.

With dynanamic 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.

Changing Port Numbers

This section describes the ports used by the Application Server and explains how to change port numbers with the Admin Console. This section contains the following topics:

Ports in the Application Server

Table Table 1-1 describes the the port listeners of the Application Server.

Table 1-1 Application Server Listeners that Use Ports

Listener

Description

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.

HTTP

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

HTTPS

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

IIOP

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

IIOP, SSL

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.

Viewing Port Numbers

  1. In the tree component, select an instance under the 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.

Changing the Administrative Server Port

  1. In the tree component, expand the HTTP Service node.
  2. Select the HTTP Listeners node.
  3. On the HTTP Listeners page, in the Name column select the admin-listener entry.
  4. On the Edit HTTP Listener page, change the value of the Listener Port field.
  5. Restart the server.

Changing an HTTP Port

  1. In the tree component, expand the HTTP Service node.
  2. Select the HTTP Listeners node.
  3. On the HTTP Listeners page, in the Name column select the the 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.

Changing an IIOP Port

  1. In the tree component, expand the ORB node.
  2. Select the IIOP Listeners node.
  3. On the IIOP Listeners page, in the Name column select the the listener whose port number you want to change.
  4. On the Edit IIOP Listener page, change the value of the Listener Port field.
  5. Click Save.
  6. Restart the server.

Changing the J2SE Software Used By the Application Server

The Application Server relies on the Java 2 Standard Edition (J2SE) software. When the Application Server was installed, the directory for the J2SE software was specified. For instructions on changing the J2SE software, see Configuring the JVM General Settings.


Configuring Domains

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 123 and the admininstrative user name is buzz. The command prompts for the administrative masterpassword.

$ asadmin create-domain --adminport 123 --adminuser buzz mydomain

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

http://hostname:123

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

install_dir/domains/mydomain

To create the domain's directory in another location, specify the --domaindir option. For the full synax 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 install_dir/domains directory, type this command:

$ asadmin list-domains

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


Starting and Stopping a Domain

Starting a Domain

To start a domain, start its administration server and application server instance. Once the application server instance is started it runs constantly, listening for and accepting requests. Each domain must be started separately. To start a domain, use one of the following methods.

Starting the Domain Using the asadmin start-domain Command

To start a domain, type the asadmin start-domain command and specify the domain name. For example, to start the default domain (domain1), type the following:

$ asadmin start-domain domain1

If there is only one domain, omit the domain name. For the full command syntax, type asadmin help start-domain.

Starting the Domain Using the Windows Start Menu

On Windows, you can start the default domain from the Windows Start menu by choosing Programs Sun Microsystems J2EE 1.4 SDK Start Default Server.

Restarting the Server

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

Stopping a Domain

Stopping a domain shuts down its administration server and application server instance. When stopping a domain, the server instance stops accepting new connections and then waits for all outstanding connections to complete. This process takes a few seconds because the server instance must complete its shut-down process. While the domain is stopped, the Admin Console or most asadmin commands cannot be used.

Stopping the Domain Using the asadmin stop-domain Command

To stop a domain, type the asadmin stop-domain command and specify the domain name. For example, to stop the default domain (domain1), type the following:

$ asadmin stop-domain domain1

If there is only one domain, then the domain name is optional. For the full syntax, type asadmin help stop-domain.

Stopping the Domain Using the Admin Console

  1. In the tree component, select an instance under the Instances node.
  2. On the General Informatioin page, click Stop Server.

Stopping With the Windows Start Menu

On Windows, you can stop the default domain from the Start menu by choosing Programs -> Sun Microsystems -> J2EE 1.4 SDK -> Stop Default Server.



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.