![]() | |
Sun Java System Application Server Standard and Enterprise Edition 7 2004Q2 Migrating and Redeploying Server Applications Guide |
Chapter 2
Migrating to Sun Java System Application Server, OverviewThis chapter provides an overview of the Application Server 7 2004Q2 product line, and describes the architecture of the Sun Java Application Server 7 2004Q2 and the J2EE components that are integral to the server environment. In addition, the differences between the Sun Java System Application Server 7 2004Q2 product line environment and earlier Sun ONE Application Server environments are described.
The following topics are addressed:
Product Line OverviewSun Java System Application Server 7 2004Q2 is an enhancement to Sun ONE Application Server 7. It incorporates the latest Java technologies in an easy-to-use, developer-friendly package. The Application Server product leverages over six years of Sun expertise in delivering highly scalable application server technology, enabling developers to rapidly build robust applications that are based on JavaServer Pages (JSP) technology, Java Servlet, and Enterprise JavaBeans (EJB) technology. This technology supports a broad range of business requirements from small departmental applications to enterprise-scale, mission-critical services. Two editions of the application server are offered to suit a variety of needs for both production and development environments:
Standard Edition
The Standard Edition offers the best platform for the developers. Standard Edition supports configuration of multiple application server instances per administrative domain. Additionally, you can use the Simple Network Monitoring Protocol (SNMP) to monitor your Standard Edition application server.Sun Java System Directory Server provides user authentication and limited application configuration storage.
Enterprise Edition
Enterprise Edition enhances the core application server platform with high availability, load balancing, and cluster management capabilities suited for the most demanding J2EE-based application deployments. The management capabilities of the Standard Edition are extended in Enterprise Edition to account for multiple-instance deployments.
Clustering support includes groups of cloned application server instances to which client requests can be load balanced. Both the web tier Load Balancing Plug-in and third-party hardware load balancers are supported by this edition. The patented “Always On,” High-Availability Database technology forms the basis for the high availability persistence store in the Enterprise Edition.
Sun Java System Application Server ArchitectureApplication servers provide the framework for a client to connect to a backend source, execute the application logic, and return the result to the client. The application server occupies the middle-tier in the three-tier computing model.
The Sun Java System Application Server 7 2004Q2 is an enhanced release of Sun ONE Application Server 7. This product line provides a robust J2EE platform for the development, deployment, and management of e-commerce application services to a broad range of servers, clients, and devices.
The key features of the Sun Java System Application Server 7 2004Q2 Enterprise Edition architecture includes:
- Clustering: a cluster is typically a group of Application Server instances configures to store session data to a single persistent datastore, the High- Availability Database, and a web server configured to use the load balancing plug-in. The cluster appears to external clients as a single installation of the Application Server. Individual server instances are referred to as nodes in a cluster.
- Session Persistence Failover: when a node in a cluster that has been configured to persist session data fails, another node accesses the session of the failed node and continues to respond to the client. The session data is stored to the High-Availability Database (HADB), a transactional, highly available, and highly scalable data store.
- High Availability of EJBs along RMI/IIOP Path: The load balancing and failover features along RMI/IIOP path routes the EJB method invocations along this path to one of the redundant instances when the server hosting the EJB becomes unavailable. HADB is used for storing the stateful session beans (SFSB) state for high availability.
For more information on configuring high availability along RMI/IIOP path using the High-Availability Database, see chapters, “Configuring the High-Availability Database,” and “Configuring CORBA Clients” in Sun Java System Application Server Administration Guide.
- High Availability of JMS Connections: Sun Java System Application Server 7 2004Q2 is certified with Sun Java System Message Queue (MQ) 3.5 (formerly called Sun ONE Message Queue). MQ3.5 supports clustering and failover of JMS connections. That is, a JMS connection obtained for a given broker will be transparently failed-over to a new broker.
For more information about the high availability of JMS connections, see chapters, “JMS Configuration,” in Sun Java System Application Server Administration Guide.
Figure 2-1 Sun Java System Application Server Architecture
The Application Server architecture illustrated in the above diagram shows the Application Server component architecture, sub-systems, access paths, and how external entities interface with the core server.
Sun Java System Application Server 7 2004Q2 architecture, is highly componentized which results in a very highly manageable architecture. All the services required by the J2EE specification are present with well-defined standard interfaces to invoke them from within applications.
The web user interface provides for easy remote server management. In fact, the server is designed such that one administration server can be used to administer multiple numbers of administered servers.
By using the JDK 1.4 for the server operation, the Application Server utilizes the enhanced abilities of this newer version of JDK to its advantage.
A typical J2EE application is composed of an n-tier system in which a client obtains processed information from a Web server or an application server. The servers in turn access the information from enterprise systems such as RDBMS or ERP, process them by using contained business logic, and deliver the processed information to the client in an appropriate format. These layers can be designated as client layer (Web browser or rich Java client), middle layer (Web servers and application servers), and the back-end layer or data layer (enterprise systems such as databases).
The J2EE application model within the Sun Java System Application Server allows developers to focus on the business logic while J2EE components handle all the low level details. Therefore, applications and services can be easily enhanced and rapidly deployed, allowing business to quickly react to competitive changes. By providing an open standard architecture through the J2EE Platform, Sun Java System Application Server solves the problem of the cost and complexity in developing multi-tiered services that are scalable, highly available, secure and reliable.
J2EE Component StandardsSun Java System Application Server 7 2004Q2 is a J2EE 1.3 compliant server based on the component standards developed by the Java community for Servlets, Java Server Pages (JSPs), and Enterprise JavaBeans (EJBs).
The following table characterizes the differences between the component APIs used with the J2EE 1.3 compliant Application Server 7 and 7 2004Q2 Enterprise and Standard editions, and the J2EE 1.2 Sun ONE Application Server 6.0/6.5.
In addition, the two products support a number of technologies connected with XML standards and Web Services which, while not part of the J2EE specification, are mentioned in the following table due to the increasing usage of these standards in enterprise applications.
Development EnvironmentsThis section characterizes the differences between the development environments for the Sun ONE Application Server 6.0/6.5 and the Sun Java System Application Server 7 2004Q2. The following topics are described:
Application Server 6.0/6.5 Development Environment
Sun ONE Application Server 6.0/6.5 offers an evaluation version of Sun ONE Studio for Java, which is especially geared towards application development for this version of the Sun ONE Application Server.
It is a very complete development environment in Java, based on the NetBeans platform. This IDE provides an extremely rich range of features for designing and developing Java applications and EJB components. It also integrates through a plug-in with Sun ONE Application Server for assembly, deployment, and debugging of the various J2EE components of an application. It is available in both Windows and Solaris.
Of the third-party vendor solutions available on the market, the recently released Borland JBuilder 6 Enterprise is an extremely mature, comprehensive product, with the added advantage of being available on several platforms (Windows, Solaris, Linux, and MacOS X). In addition to its Java development features (servlets, JSP pages, EJB components, graphic applications), JBuilder also caters for UML design, unit testing, collaborative development, and XML development. Moreover, JBuilder integrates perfectly with mainstream application servers (including the Sun ONE Application Server) for assembly, deployment and debugging of Web applications and EJB components.
Application Server 7 and 7 2004Q2 Development Environment
The availability of a fully integrated development solution is key to the success of the Sun Java System Application Server. Sun ONE Studio for Java Enterprise Edition 5, Update 1 is the strategic tool for Sun Java System application development.
Sun ONE Studio for Java 5, update 1 is supported with Sun Java System Application Server 7 2004Q2.
Some of the key features of Sun ONE Studio Enterprise Edition 5 are:
- Ability to build EJBs quickly and easily
- Ability to assemble applications from EJBs and package applications for deployment
- Application server integration for deployment
- Ability to develop and publish web services
- Sun ONE Studio enterprise service presentation toolkit
- Parallel development using Sun ONE Studio Code Management Software
- Ability to integrate with the Sun Java System Application Server
As shown in the following figure, the Sun Java System Application Server integration module relies upon the NetBeans Open Source modules that are implemented from the Sun ONE Studio Close Source.
Figure 2-2 Sun ONE Studio 5 Update 1, Enterprise Edition and Sun Java System Application Server 7 2004Q2 Integration
Administration ToolsThis section characterizes the differences between the administration tools for the Sun ONE Application Server 6.0, Sun ONE Application Server 6.5, and the Sun ONE Application Server 7. The following topics are described:
Sun ONE Application Server 6.0 Administration Tools
Sun ONE Application Server 6.0 features a full set of graphical administration tools, which cover all the aspects of server management and administration
- Sun ONE Console - the main administration control panel. Sun ONE console gives fast access to the Administration Server Console, the Directory Server, and the Administration Tool.
- Administration Server Console - used to define event-logging options and to create SSL security certificates.
- Sun ONE Directory Server Console - used for administration of the Sun ONE Directory Server. The Directory Server is used to administer the two main information directory trees, the user directory (user and organizational unit administration), and the configuration directory (server configuration).
- Sun ONE Administration Tool - used to administer one or more instances of Sun ONE Application Server 6.0, along with the applications deployed. It also enables JDBC drivers and data sources to be configured.
- Sun ONE Registry Editor (kregedit) - is a graphical tool similar to the windows registry editor (regedit). It is used to adjust certain parameters specific to the Sun ONE Application Server, stored in a specific registry.
Sun ONE Application Server 6.5 Administration Tools
Sun ONE Application Server 6.5 can be administered using integrated Administration Tool, Sun ONE registry editor and command line tools, which are described below:
- Sun ONE Application Server Administration Tool - a stand-alone Java application with a graphical user interface that allows you to administer one or more instances of Sun ONE Application Server along with administering application components.
- Command line tools - can be run from the command-line prompt on Windows and the shell prompt on Solaris. You can perform a variety of tasks using the command line tools, right from basic configuration to deploying an application. To get a complete description of any command-line tool, type [command] -help at the command prompt. For ease of use, most of the command-line tools have been integrated with the Sun ONE Application Server Administration Tool and the Sun ONE Application Server Deployment Tool.
- Sun ONE Registry Editor (kregedit) - a stand-alone GUI tool similar to the Windows Registry editor (regedit). It can display and edit registry information for Sun ONE Application Server.
Application Server 7 and 7 2004Q2 Administration Tools
The Administration Server in is a special instance of the Server that serves the Administration interface and controls some global settings common to all server instances. It is a web-based server that contains the forms used to configure the Sun Java System Application Server.
This graphical tool allows you to manage your application server including viewing error and access logs, monitoring server usage, creating and editing virtual servers, apply configuration changes and start or stop server instances.
When you installed the Application Server, you chose a port number for the Administration Server, or used the default port of 4848. To access the Administration interface, in a web browser type:
http://hostname:port/admin
You are prompted for the configured user name and password. Upon entering this information and clicking the OK button, the home page of the Administration interface is displayed, as shown in the following figure.
The left pane is a tree view of all items you can configure in the Sun Java System Application Server. To use the Administration interface, click an item in the left pane. The right pane displays the page associated with that item.
You can access help for any page in the Administration interface by clicking the Help button in the banner at the top of the Administration interface. The online help describes the use of the page you are accessing and gives information about what to enter in the fields on the page.
Figure 2-3 Administration Interface Home Page
Sun Java System Application Server contains a command line interface. You can use a utility and commands to perform the same set of tasks as you can perform in the Administration interface. You can use these commands either from a command prompt in the shell, or you can call them from other scripts and programs. Using these commands you can automate administration tasks that otherwise might become repetitive.
Sun Java System Application Server has a command line utility asadmin, which can be run from command-line prompt on Windows and the shell prompt on Solaris. The asadmin utility has a set of commands used to perform administrative tasks. You can use these commands to perform all the same tasks that are performed from the Administration Interface, from basic configuration to deploying an application. To get a complete description of any command, type help after entering the asadmin utility.
You can run asadmin either in single mode or multi-mode. In single mode you run one command at a time from the command prompt. In multi-mode you can run multiple commands without needing to reenter environment-level information.
Database ConnectivitySee the Sun Java System Application Server Installation Guide for a complete description of the databases supported with each release of the Application Server.
J2EE Application Components and MigrationJ2EE simplifies development of enterprise applications by basing them on standardized, modular components, providing a complete set of services to those components, and handling many details of application behavior automatically, without complex programming. J2EE 1.3 architecture includes several component APIs. Prominent J2EE APIs include:
J2EE components are packaged separately and bundled into a J2EE application for deployment. Each component, its related files such as GIF and HTML files or server-side utility classes, and a deployment descriptor are assembled into a module and added to the J2EE application. A J2EE application is composed of one or more enterprise bean(s), Web, or application client component modules. The final enterprise solution can use one J2EE application or be made up of two or more J2EE applications, depending on design requirements.
A J2EE application and each of its modules has its own deployment descriptor. A deployment descriptor is an XML document with a .xml extension that describes a component’s deployment settings. An enterprise bean module deployment descriptor, for example, declares transaction attributes and security authorizations for an enterprise bean. Because deployment descriptor information is declarative, it can be changed without modifying the bean source code. At run time, the J2EE server reads the deployment descriptor and acts upon the component accordingly.
A J2EE application with all of its modules is delivered in an Enterprise Archive (EAR) file. An EAR file is a standard Java Archive (JAR) file with an .ear extension. The EAR file contains EJB JAR files, application client JAR files and/or Web Archive (WAR) files. The characteristics of these files are as follows:
- Each EJB JAR file contains a deployment descriptor, the enterprise bean files, and related files
- Each application client JAR file contains a deployment descriptor, the class files for the application client, and related files
- Each WAR file contains a deployment descriptor, the Web component files, and related resources
Using modules and EAR files makes it possible to assemble a number of different J2EE applications using some of the same components. No extra coding is needed; it is just a matter of assembling various J2EE modules into J2EE EAR files.
The migration process is concerned with moving J2EE application components, modules, and files.
For more information on migrating various J2EE components refer to Chapter 3, "Migrating Applications to Sun Java System Application Server 7 2004Q2."
For more background information on J2EE, see the following references:
- J2EE tutorial - http://java.sun.com/j2ee/tutorial/
- J2EE overview - http://java.sun.com/j2ee/overview.html
- J2EE topics - http://java.sun.com/j2ee/