Sun ONE Application Server 7, Enterprise Edition Migrating and Redeploying Server Applications Guide |
Chapter 2
Migrating to Sun ONE Application Server 7, Enterprise Edition OverviewThis chapter provides an overview of the application Server 7 product line, and describes the architecture of the Sun ONE Application Server 7 and the J2EE components that are integral to the server environment. In addition, the differences between the Sun ONE Application Server 7 product line environment and earlier Sun ONE Application Server environments are described.
The following topics are addressed:
Product Line OverviewSun ONE Application Server 7 is a breakthrough product that raises the bar in application server technologies. 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. Three editions of the application server are offered to suit a variety of needs for both production and development environments:
Platform Edition
Platform Edition forms the core of the Sun ONE Application Server 7 product line. This product offers a high-performance, J2EE 1.3 specification-compatible runtime environment that is ideally suited for basic operational deployments, as well as for embedding in third-party applications.
Platform Edition deployments are limited to single application server instances (that is, single virtual machines for the Java platform (Java virtual machine or JVM)). Multi-tier deployment topologies are supported by the Platform Edition, but the web server tier proxy does not perform load balancing. In Platform Edition, administrative utilities are limited to local clients only.
The Platform Edition of Sun ONE Application Server 7 is bundled with Solaris 9.
Standard Edition
The Standard Edition builds on the functionality of the Platform Edition, and layers enhanced remote-management capabilities which allow the management of multiple application server instances from a central administration station. This edition also includes the ability to distribute web application traffic through a web server tier proxy. 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 ONE Directory Server is bundled with Standard Edition for 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 ONE Application Server 7 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 ONE Application Server 7 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 ONE Application Server 7 Enterprise Edition architecture includes:
- Clustering: a cluster is typically a group of Sun ONE 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 Sun ONE Application Server. Individual Sun ONE Application 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.
Sun ONE Application Server 7 is also a significant architectural departure from the first generation of Sun ONE application server products. By combining existing and strong Sun ONE products and technologies with the J2EE 1.4 standards, Sun ONE Application Server 7 architecture is built upon a proven framework of technologies.
Figure 2-1 Sun ONE Application Server 7 Enterprise Edition Architecture
The Sun ONE Application Server 7 architecture illustrated in the above diagram shows the Sun ONE Application Server component architecture, sub-systems, access paths, and how external entities interface with the core server.
Sun ONE Application Server 7 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, Sun ONE 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 ONE 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 ONE 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 ONE Application Server 7 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).
In contrast to Sun ONE Application Server 7, Sun ONE Application Server 6.0/6.5 is a J2EE 1.2 compliant server. Between the two J2EE versions, there are considerable differences with the J2EE application component APIs.
The following table characterizes the differences between the component APIs used with the J2EE 1.3 compliant Sun ONE Application Server 7 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 ONE Application Server 7. The following topics are described:
Sun ONE 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.
Sun ONE Application Server 7 Development Environment
The availability of a fully integrated development solution is key to the success of the Sun ONE Application Server 7. Sun ONE Studio for Java Enterprise Edition 4 is the Sun ONE strategic tool for Sun ONE application development.
Sun ONE Studio for Java 4 is provided with Sun ONE Application Server.
Some of the key features of Sun ONE Studio for Java Enterprise Edition 4 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 for java enterprise service presentation toolkit
- Parallel development using Sun ONE Studio for Java Code Management Software (formerly Forte TeamWare)
- Ability to integrate with the Sun ONE Application Server 7
As shown in the following figure, the Sun ONE Application Server 7 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 4.0 Enterprise Edition and Sun ONE Application Server 7 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.
Sun ONE Application Server 7 Administration Tools
The Administration Server in Sun ONE Application Server 7 is a special instance of the Server that serves the Administrative 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 ONE 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 Sun ONE Application Server, you chose a port number for the Administration Server, or used the default port of 4848. To access the Administrative 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 Administrative 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 ONE Application Server. To use the Administrative 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 Administrative interface by clicking the Help button in the banner at the top of the Administrative 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 Administrative Interface Home Page
Sun ONE Application Server 7 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 Administrative 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 ONE Application Server 7 has a command line utility asadmin, which can be run from the 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 Administrative 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 Platform Summary for a complete description of the databases supported with each release of the Sun ONE 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 an .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 please refer to Chapter 3, "Migrating from Sun ONE Application Server 6.x to Sun ONE Application Server 7."
For more background information on J2EE, see the following references: