Sun Java™ System Application Server Platform Edition 8 Administration Guide |
Chapter 1
Getting StartedThis chapter briefly describes the Sun Java System Application Server Platform Edition 8 and introduces basic administration tasks. This chapter contains following sections:
About the Sun Java System Application Server Platform Edition 8What is the Sun Java System Application Server Platform Edition 8?
The Sun Java System Application Server Platform Edition 8 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 Sun Java System Application Server Platform Edition 8 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 to a specific port number.
Web Services
On the J2EE 1.4 platform, you can 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 can 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:
- Naming: A naming and directory service binds objects to names. A J2EE application can locate an object by looking up its JNDI name. JNDI stands for the Java Naming and Directory Interface API.
- Security: The Java Authorization Contract for Containers (JACC) is a set of security contracts defined for the J2EE containers. Based on the client’s identity, the containers can restrict access to the container’s resources and services.
- Transaction management : A transaction is an indivisible unit of work. For example, transfering funds between bank accounts is a transaction. A transaction management service ensures that a transaction either completes fully, or is rolled back.
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. As an administrator, one of your responsibilities will be resource configuration. The J2EE platform enables access to external systems through the following APIs and componenets:
- JDBC : A database management system (DBMS) provides facilities for storing, organizing, and retrieving data. Most business applications store data in relational databases, which applications access via the JDBC API. The information in databases can be described as persistent because it is saved on disk and exists after the application ends. The Application Server bundle includes the PointBase DBMS.
- Messaging: Messaging is a method of communication between software components or applications. A messaging client can send messages to, and receive messages from, any other client. Applications access the messaging provider through the Java Messaging Service (JMS) API. The Application Server includes a JMS provider.
- Connector: The J2EE Connector architecture enables integration between J2EE applications and existing Enterprise Information Systems (EIS). An application can access an EIS through a portable J2EE component called a connector or resource adapter.
- JavaMail: Through the JavaMail API, applications can connect to an SMTP server in order to send and receive email.
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, as an administrator, you will deploy (install) applications and monitor the server’s performance. You will perform these tasks with the administration tools provided by the Application Server. See the section Tools for Administration.
Figure 1-1 Sun Java System Application Server Platform Edition 8 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 you change the configuration for one domain, the configurations of other domains are not affected.
In an Admin Console session, you can configure and manage a single domain. Each domain has its own administration server, which has a unique port number. You specify the port number in the URL of your browser to run the Admin Console.
In this release, each administrative domain has a single application server instance. An application server instance may belong to just one domain. When you installed the Application Server, an administrative domain named
domain1
was automatically created.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 in order for you to use the Admin Console.
When you installed the Application Server, you chose a port number for the server, or used the default port of 4848. You also specified a user name and password.
To start the Admin Console, in a web browser type:
http://hostname:port
For example:
http://austen.sun.com:4848
If you are running the Admin Console on the machine on which the Application Server was installed, you can specify
localhost
for the host name.On Windows, you can 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, you may choose to create additional administrative domains. Each domain has its own administration server, which has a unique port number. When you specify the URL for the Admin Console, be sure to use the port number for the domain that you want to administer.The asadmin Utility
The
asadmin
utility is a command-line tool. You can use theasadmin
utility and the commands associated with it to perform the same set of tasks as you can perform in the Admin Console. For example, you can start and stop domains, configure the server, and deploy applications.You can use these commands either from a command prompt in the shell, or you can call them from other scripts and programs. You can use these commands to automate repetitive administration tasks.
To start the
asadmin
utility:
$ asadmin
To list the commands available within
asadmin
:
asadmin> help
You can also 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
If you make the following configuration changes, you must restart the server for the changes to take effect:
For instructions, see Restarting the Server.
With dynanamic configuration, most changes will take effect while the server is running. If you make the following configuration changes, you do NOT have to 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 1-1 describes the the port listeners of the Application Server.
Viewing Port Numbers
Changing the Administrative Server Port
Changing an HTTP Port
- In the tree component, expand the HTTP Service node.
- Select the HTTP Listeners node.
- On the HTTP Listeners page, in the Name column select the the listener whose port number you want to change.
- On the Edit HTTP Listener page, change the value of the Listener Port field.
- Click Save.
- Restart the server.
Changing an IIOP Port
Changing the J2SE Software Used By the Application Server
The Application Server relies on the Java 2 Standard Edition (J2SE) software. When you installed the Application Server, you specified the directory of the J2SE software. For instructions on changing the J2SE software, see Configuring the JVM General Settings.
Further Information
- Sun Microsystems Wordlwide Training - Over 250,000 students each year are trained by Sun and its authorized centers through Web-based courses and at over 250 training sites located in more than 60 countries. For more information, see:
http://training.sun.com/
- The J2EE 1.4 Tutorial - Written for developers, the tutorial has administrative instructions for configuring JMS, setting up JavaMail resources, and managing security. To access the tutorial, go to this URL:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
- Sun Java System Application Server Platform Edition 8 Developer’s Guide - This guide contains development information that is specific to the Application Server. The Developer’s Guide is available at:
http://docs.sun.com/db/doc/817-6087
- The
asadmin
man pages - Available in HTML format, these pages include syntax and examples forasadmin
commands. These HTML pages are posted at the following URL:http://docs.sun.com/db/doc/817-6092
- Sun Java System Application Server Platform Edition 8 Release Notes - Available online at:
http://docs.sun.com/db/doc/817-6082
- Getting Started With J2EE Connectors - This document has instructions for for configuring connectors (resource adapters), connection pools, and connector resources:
http://java.sun.com/j2ee/connector/
- docs.sun.com: Sun Product Documentation - From this site you can search for and access all of our product documentation:
http://docs.sun.com/
- J2EE 1.4 Documentation page - Located on our public Web site, this page has links to the technical documentation for the J2EE 1.4 platform:
http://java.sun.com/j2ee/1.4/docs/
- The Quick Start Guide - This document shows you how to deploy and run a simple Web application. The guide is in the install_dir
/docs/QuickStart.html
file.
Configuring DomainsCreating a Domain
Domains are created using the
create-domain
command. The following example command creates a domain namedmydomain
. The administration server listens on port 123 and the admininstrative user name isbuzz
. The command prompts for the administrative password.
$ asadmin create-domain --adminport 123 --adminuser buzz mydomain
To start the Admin Console for this domain, in a browser you would enter the following URL:
http://
hostname:123/asadmin
For the preceding
create-domain
example, the domain’s log files, configuration files, and deployed applications will reside in the following directory:install_dir
/domains/mydomain
To create the domain’s directory in another location, you specify the
--domaindir
option. For the full synax of the command, typeasadmin 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 namedmydomain
, 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 DomainStarting a Domain
When you start a domain, you 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 With the asadmin start-domain Command
To start a domain, you type the
asadmin start-domain
command and specify the domain name. For example, to start the default domain (domain1
), you type the following:
$ asadmin start-domain domain1
If there is only one domain, you may omit the domain name. For the full command syntax, type
asadmin help start-domain
.Starting With 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
In this release, restarting the server is the same as restarting the domain. To restart the domain, you stop and start the domain.
Stopping a Domain
Stopping a domain shuts down its administration server and application server instance. When you stop a domain, the server instance stops accepting new connections and then waits for all outstanding connections to complete. It may take a few seconds for the server instance to complete its shut-down process. While the domain is stopped, you cannot use the Admin Console or most
asadmin
commands.Stopping With the asadmin stop-domain Command
To stop a domain, you type the
asadmin stop-domain
command and specify the domain name. For example, to stop the default domain (domain1
), you 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 With the Admin Console
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.