The Sun Java System Application Server provides a Java 2 Platform, Enterprise Edition (J2EE platform) 1.4 compatible platform for developing and delivering server side Java applications and Web services. Key features include scalable transaction management, container-managed persistence runtime, performant web services, clustering, high availability, security, and integration capabilities.
The Application Server is available in the following editions:
The Platform edition is free and is intended for software development and department-level production environments.
The Enterprise edition is designed for mission-critical services and large-scale production environments. It supports horizontal scalability and service continuity with a load balancer plug-in and cluster management. The Enterprise edition also supports reliable session state management with the high-availability database (HADB).
This section contains the following topics:
The Application Server is a platform that supports services from Web publishing to enterprise-scale transaction processing, while enabling developers s 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.xml.
The Application Server Enterprise Edition provides advanced clustering and failover technologies. The Application Server infrastructure supports the deployment of many types of distributed applications and is an ideal foundation for building applications based on Service Oriented Architectures (SOA). SOA is a design methodology aimed at maximizing the reuse of application services. These features enable you to run scalable and highly available J2EE applications.
Scalability - Scalability is achieved through clustering. A cluster is a group of application server instances that work together as one logical entity. Each Application Server instance in a 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 refers to the failover capability. If one server instance goes down, another server instance in a cluster takes over the sessions of the failed instance and continues to serve the clients in a seamless manner. 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 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 Java Beans 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 Java 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 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:
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 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 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:
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 management system.
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 J2EE Connector architecture enables integration between J2EE applications and existing Enterprise Information Systems (EIS). An application accesses an EIS through a portable J2EE component called a connector or resource adapter.
Server Administration - The lower right-hand corner of Figure 1-1 shows administration interfaces of the Application Server. Administration tools communicate with the Application Server using these interfaces.
Various different tools and APIs are available to administer the Sun Java System Application Server:
The Administration 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 Administration Console. You need the administration server hostname and port number to launch the Administration Console. The default administration server port number for the default administration server is 4849. You also need the administration username and password to login to the Administration Console. Consult the section for more detailed information.
To start the Administration Console, in a web browser type:
If the Administration Console is running on the machine on which the administration server is running, you can specify localhost for the host name.
On Windows, start the Application Server Administration Console from the Start menu.
The asadmin utility is a command-line interface for the Sun Java System Application Server. You can perform the same set of administrative tasks offered by the Administration Console. The asadmin utility can be invoked from a command prompt in the shell, or called from other scripts or programs. The asadmin utility is installed in install-dir/bin directory. The default Sun Java System Application Server installation root directory on Solaris is /opt/SUNWappserver.
To start the asadmin utility, go to the install-dir/bin directory and enter:
To list the commands available within asadmin:
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 on the Web at Sun Java System Application Server Enterprise Edition 8.2 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 16, Using the Java Management Extensions (JMX) API, in Sun Java System Application Server Enterprise Edition 8.2 Developer’s Guide .