The Sun Java System Application Server provides a Java EE compatible server for the development and deployment of Java EE applications and Java Web Services. Key features include scalable transaction management, container-managed persistence runtime, performant web services, clustering, high availability, security, and integration capabilities. This section contains the following topics:
Every administrative domain is associated with a usage profile, which identifies the capabilities of that domain. Application Server provides the following profiles:
Developer: Use this profile if you are running your domain in a development environment and if your applications do not need the NSS keystore or clustering features, such as load balancing, and session persistence.
Cluster: Use this profile if you need to create clusters but do not require the high-availability database (HADB) or the NSS keystore.
Enterprise: Use this profile if you need HADB and NSS. This profile is usable only if you install HADB and NSS separately or if you install Application Server as part of the Java Enterprise System (JES). For information on how you can use the enterprise profile with Application Server 9.1, see Using the Enterprise Profile
Upgrade from Application Server 8.x Enterprise Edition is supported only by the enterprise profile. Use the developer profile if you are upgrading from Application Server 8.x Platform Edition. For more information on the Upgrade process, see Chapter 2, Upgrading an Application Server Installation, in Sun Java System Application Server 9.1 Upgrade and Migration Guide.
The domain provides a preconfigured runtime for the user applications. Usage profiles facilitates the distinction between the Application Server binaries and the runtime configuration. Profiles enable you to use the same installation of Application Server to create different domains with profiles that suit specific needs. For example, a developer may want to use the Application Server to get to know the latest Java EE specifications. This developer does not need stringent security settings. Another user who wants to deploy applications in a production environment needs an inherently secure environment.
Table 1–1 lists the features available with each profile:
Table 1–1 Features Available for Each Profile
Feature |
Developer Profile |
Cluster Profile |
Enterprise Profile |
---|---|---|---|
Security store |
JKS |
JKS |
NSS |
Clustering/Standalone instances |
Not available |
Available |
Available |
Security Manager |
Disabled |
Enabled |
Enabled |
HADB |
Not available |
Not available |
Available |
Load balancing |
Not available |
Available |
Available |
Node agents |
Not available |
Available |
Available |
To use the enterprise profile, perform the following tasks:
Download and install NSS and HADB separately.
Modify the asenv.conf file as follows:
AS_HADB points to the folder where HADB is installed.
AS_NSS points to the folder where NSS shared objects are available.
AS_NSS_BIN points to the folder where NSS binaries, such as certutil, are stored.
You can use the start-domain command to upgrade Application Server 8.x or 9.0 domains to Application Server 9.1. Use one of the following ways to upgrade your domain:
Perform an in-place upgrade of the Application Server binaries.
When you run start-domain on the domains pointing to the earlier version of Application Server, asadmin invokes the asupgrade command , and the domains are automatically upgraded in-place.
Perform a side-by-side upgrade of the Application Server binaries.
Run start-domain on the domains of your earlier installation. The asupgrade command upgrades the domains to the domains root of the latest Application Server installation. In this scenario, the target directory for the upgrade is defined in the AS_DEF_DOMAINS_PATH in the asenv.conf.
The Application Serveris a platform that 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 9.1 Clustering and Enterprise profiles provide advanced clustering and failover technologies. These features enable you to run scalable and highly available Java EE applications.
Clustering - A cluster is a group of application server instances that work together as one logical entity. Each Application Server instance in the cluster has the same configuration and the same applications deployed to it.
Horizontal scaling is achieved by adding Application Server instances to a cluster, thereby increasing the capacity of the system. It is possible to add Application Server instances to a cluster without disrupting service. The HTTP, RMI/IIOP, and JMS load balancing systems distribute requests to healthy Application Server instances in the cluster.
High Availability - Availability allows for failover protection of Application Server instances in a cluster. If one application server instance goes down, another Application Server instance takes over the sessions that were assigned to the unavailable server. Session information is stored in the high-availability database (HADB). HADB supports the persistence of HTTP sessions and stateful session beans.
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 Java EE components. Figure 1–1 shows the two types of Java EE 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 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 Java EE 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 Java EE 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 Java EE 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 Java EE application locates 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 Java EE containers. Based on the client’s identity, the containers restrict access to the container’s resources and services.
Transaction management - A transaction is an indivisible unit of work. For example, transferring funds between bank accounts is a transaction. A transaction management service ensures that a transaction either completes fully or is rolled back.
The Java EE 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 Java EE platform enables access to external systems through the following APIs and components:
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 is often described as persistent because it is saved on disk and exists after the application ends. The Application Server bundle includes the Java DB database.
Messaging - Messaging is a method of communication between software components or applications. A messaging client sends messages to, and receives 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 Java EE Connector architecture enables integration between Java EE applications and existing Enterprise Information Systems (EIS). An application accesses an EIS through a portable Java EE component called a connector or resource adapter.
JavaMail - Through the JavaMail API, applications 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, an administrator deploys (installs) applications and monitors the server’s performance. These tasks are performed with the administration tools provided by the Application Server.
The Application Server provides the following administration tools and APIs:
The Admin Console is a browser-based tool that features an easy-to-navigate interface and online help. The administration server (also called the Domain Administration Server or DAS) must be running to use the Admin Console. To, launch the Administration Console, you must know the administration server hostname and port number. 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 Application Server Admin Console from the Start menu.
The installation program creates the default administrative domain (named domain1). . 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.
If your configuration includes remote server instances, create node agents to manage and facilitate remote server instances. It is the responsibility of the node agent to create, start, stop, and delete a server instance. Use the command line interface (CLI) commands to set up node agents.
The asadmin utility is a command-line interface for the Sun Java System Application Server. Use the asadmin utility and the commands associated with it to perform the same set of administrative tasks offered by the Admin Console. The default installation root directory on Solaris is /opt/SUNWappserver.
To start the asadmin utility, go to the as-install/bin directory and enter:
$ ./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 and PDF format in the Sun Java System Application Server 9.1 Reference Manual.
In the Java 2, Platform Standard Edition 5.0, the Java Monitoring and Management Console (JConsole) was introduced. JConsole is used to monitor the Sun Java System Application Server. You can use either the JConsole remote tab, or the advanced tab to connect to the Application Server.
Remote Tab: identify the username, password, administration server host, and JMS port number (8686 by default), and select Connect.
Advanced Tab: identify the JMXServiceURL as service:jmx:rmi:///jndi/rmi://host:jms-port/jmxrmi and select Connect. The JMXServerURL is printed in the server.log file as well as output in the command window of the domain creation command.
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 Chapter 20, Using the Application Server Management Extensions, in Sun Java System Application Server 9.1 Developer’s Guide.