The Sun Java System Application Server 9.1 is a Java EE 5 platform-compatible server for the development and deployment of Java EE applications and Java technology-based web services in large-scale production environments.
This chapter includes:
The Application Server 9.1 includes the following enhancements:
Java EE 5 platform support — Sun Java System Application Server Enterprise Edition 9.1 implements the Java EE 5 specification to deliver one of the best application runtimes for next-generation enterprise applications and web services. Application Server 9.1 implements the following Java EE standards:
Enterprise Java Beans 3.0
JAXB 2.0
Java Persistence
Java Server Faces 1.2
Java Server Pages 2.1 (JSP 2.1)
Java Server Pages Standard Tag Library (JSTL) 1.2
Streaming API for XML (StAX)
Web Services Metadata
Java API for XML based Web Services 2.0 (JAX-WS 2.0)
Common Annotations for the Java Platform 1.0 (CAJ 1.0)
Java Servlet 2.5
The complete list of Java EE 5 platform technologies is provided later in these notes.
Web Services Interoperability Technologies (WSIT) support – Sun is working closely with Microsoft to ensure interoperability of Web services enterprise technologies such as message optimization, reliable messaging, and security. The initial release of WSIT is a product of this joint effort. WSIT is an implementation of a number of open web services specifications to support enterprise features. In addition to message optimization, reliable messaging, and security, WSIT includes a bootstrapping and configuration technology. Starting with the core XML support currently built into the Java platform, WSIT uses or extends existing features and adds new support for interoperable web services, including:
Bootstrapping and Configuration
Message Optimization Technology
Reliable Messaging Technology
Security Technology
See More About WSIT Integration later in this chapter for more information about WSIT integration in Application Server 9.1.
Java Business Integration (JBI) support – JBI extends Java EE with business integration Service Provider Interfaces (SPI). These SPI enable developers to create or implement a Java business integration environment for specifications such as WSCI, BPEL4WS and the W3C Choreography Working Group. A JBI implementation is installed directly by the Application Server installer, mostly in the AS_HOME/jbi directory. This directory contains all common JAR files and system components for the JBI including a lifecycle module that starts the JBI framework in the Application Server JVM.
In-memory replication support – In-memory replication on other servers provides lightweight storage of session state data without the need to obtain a separate database, such as HADB. This type of replication uses memory on other servers for high availability storage of HTTP session and stateful session bean data. Clustered server instances replicate session state in a ring topology. Each backup instance stores the replicated data in memory. Replication of session state data in memory on other servers enables sessions to be distributed. The use of in-memory replication requires the GroupManagement Service (GMS) to be enabled (which is true by default).
Usage profiles – Every administrative domain is associated with a usage profile, which identifies the capabilities of that domain. Application Server 9.1 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 clustering features, such as load balancing, high availability, and session replication. Note that the actual name of the profile is “developer” (case sensitive).
Cluster – Use this profile if you want to create clusters of application server instances imparting scalability and high availability to the deployed Java EE applications. The state of the applications is persisted in-memory. Note that the actual name of the profile is “cluster” (case sensitive).
Enterprise – Use this profile if you need HADB and NSS. This profile is not usable unless you install HADB and NSS separately or install the Application Server as part of the Java Enterprise System (Java ES).
Load balancing enhancements – Several enhancements have been added to the load balancing plugin. Briefly, these include
Weighted Round Robin – An optional attribute called weight has been added to the instance Loadbalancer.xml file. This option enables the load balancer plugin to route requests according to the weight. For example, for every 500 requests, 100 will go to instance1 and 400 would go to instance2. The default weight is 100. The weight is assigned to each instance from the admin console or command line, and the server domain.xml has an attribute for every instance indicating the weight.
User-Defined Load Balancer Decision – Enables users to define custom logic for load balancing; for example, user identity-based redirects and mime-based load balancing. This feature is implemented by means of a user-defined shared library that gets loaded by the load balancer. This custom shared library implements the interface as defined in loadbalancer.h, which is placed in appserver_install_dir/lib/install/templates/.
Administration Enhancements – Previous versions of Application Server required that the loadbalancer.xml file be manually copied to the particular server's config directory. Application Server 9.1 includes push automations for performing such copies between the Web server and Application Server. The load balancer itself is configured in the server's domain.xml file.
Open Source and GlassFish Community — In June 2005, Sun launched the GlassFish community with the goal of developing a free, open source, commerical-grade application server that implements the newest features of the Java EE 5 platform and related enterprise technologies. Application Server Enterprise Edition 9.1 is based on the source code developed by Sun engineers and the GlassFish community.
Update Center Support – The Application Server 9.1 Update Center provides automated Application Server updates and easy access to additional components. See Using the Application Server Update Center for more information.
This section lists the requirements that must be met before installing the Sun Java System Application Server 9.1 product.
All supported operating systems are 32-bit unless indicated otherwise. The 64-bit JDK is supported only on 64-bit supported operating systems.
The following table lists the operating systems with which the Sun Java System Application Server Enterprise Edition 9.1 is compatible.
Table 2–1 Supported Operating Systems
Operating System |
Minimum Memory |
Recommended Memory |
Minimum Disk Space |
Recommended Disk Space |
JVM |
---|---|---|---|---|---|
Sun Solaris 9, 10 (SPARC) Solaris 9, 10 (x86) |
512 MB |
512 MB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 |
64–bit Sun Solaris 10 (SPARC, x86) |
512 MB |
512 MB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 |
Redhat Enterprise Linux 3.0 U1, 4.0 |
512 MB |
1 GB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 |
SuSE Linux Enterprise Server 10 SP1 |
512 MB |
1 GB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 |
Windows Server 2000 SP4+ Windows 2000 Advanced Server SP4+ Windows Server 2003 Windows XP Pro SP1+ Windows Vista |
1 GB |
2 GB |
500 MB free |
1 GB free |
J2SE 5.0 Java SE 6 |
On UNIXTM, you can check your operating system version using the uname command. Disk space can be checked using the df command.
Its recommended that you use the NTFS file system rather than FAT or FAT32 when running the Application Server on any Microsoft Windows platform.
System virtualization is a technology that enables multiple operating system (OS) instances to execute independently on shared hardware. Functionally, software deployed to an OS hosted in a virtualized environment is generally unaware that the underlying platform has been virtualized. Sun performs testing of its Sun Java System products on select system virtualization and OS combinations to help validate that the Sun Java System products continue to function on properly sized and configured virtualized environments as they do on non-virtualized systems. For information about Sun support for Sun Java System products in virtualized environments, see System Virtualization Support in Sun Java System Products.
It is recommended that Solaris 9, 10 (x86, SPARC) users have the “Sun recommended patch cluster” installed. This patch cluster is available under “Recommended and Security Patches” on the SunSolve Web site.
The minimum (and certified) version if JDK required for Application Server 9.1 is 1.5.0_13. JDK 1.5.0_13 can be downloaded from http://java.sun.com/javaee/downloads/?intcmp=1282.
Table 2–2 lists databases and drivers that meet the Java EE compatibility requirements. All supported configurations of the Sun Java System Application Server Enterprise Edition must contain at least one database/driver combination from this table, such as the bundled Java DB database and driver. In addition, the Application Server is designed to support JDBC connectivity to any additional DBMS with a corresponding JDBC driver.
Table 2–2 Java EE-Compatible JDBC Drivers
JDBC Driver Vendor |
JDBC Driver Type |
Supported Database Server |
---|---|---|
Derby Network Client |
Type 4 |
Derby 10.2 |
DataDirect 3.60.29 |
Type 4 |
Oracle 10g |
DataDirect 3.6 |
Type 4 |
DB2 9.1 DB2 8.2 |
Oracle Thin |
Type 4 |
Oracle 10g |
PostGres |
Type 4 |
8.1 |
MySQL Connector/J Driver 3.1 |
Type 4 |
MySQL 5 |
Table 2–3 lists all the additional databases and drivers scheduled to be supported in the Application Server FCS release.
Table 2–3 Supported JDBC Drivers and Databases (Application Server FCS)
JDBC Driver Vendor |
JDBC Driver Type |
Supported Database Server |
---|---|---|
Oracle OCI |
Type 2 |
Oracle 9i |
IBM DB2 |
Type 2 |
DB2 9.1 |
Oracle 10G |
Type 4 |
-RAC |
DataDirect 3.60.29 |
Type 4 |
Sybase ASE 15 MS SQL 2005 |
MySQL Connector/J Driver 3.1 |
Type 4 |
MySQL 5 |
In general, the Application Server Enterprise Edition 9.1 supports all JDBC drivers that meet the Java EE specification.
This section provides instructions for using the Java DB database implementation bundled with Application Server 9.1. Java DB is based on the Apache Derby database.
Sun Java System Application Server 9.1 introduces two new asadmin commands for starting and stopping the Java DB Network Server.
Use the asadmin start-database command to start an instance of the Java DB network server:
start-database [--dbhost 0.0.0.0] [--dbport 1527] [--dbhome path] |
The default value for the host is 0.0.0.0, which enables Java DB to listen on localhost as well as the IP/hostname interfaces. The value for the dbhome property is the location of where the Java DB databases reside. The default path is appserver_install_dir/javadb.
Use the asadmin stop-database command to shut down a running instance of the Java DB network server:
stop-database [--dbhost 0.0.0.0] [--dbport 1527] |
These scripts are deprecated in Application Server 9.1.
The Java DB configuration that ships with Application Server 9.1 also includes several useful scripts which can help you use Java DB. The following scripts are available for use in the <appserver_install_dir>/javadb/frameworks/NetworkServer/bin directory:
startNetworkServer.ksh/bat — Script to start the network server
stopNetworkServer.ksh/bat — Script to stop the network server
ij.ksh/bat — interactive JDBC scripting tool
dblook.ksh/bat — Script to view all or part of the DDL for a database
sysinfo.ksh/bat — Script to display versioning info regarding the Java DB environment
NetworkServerControl.ksh/bat — Script which provides a means of executing commands on the NetworkServerControl API
Set the DERBY_INSTALL environment variable to point to the <appserver_install_dir>/javadb directory.
Unset your CLASSPATH environment variable.
You can also optionally set the following properties:
For more information about these utilities, see the Derby Tools and Admin guides.
This example shows how to capture the DDL for a Pointbase table in commander and create the same table in Java DB using NetBeans 5.0. Another option for doing this is by using the commander tool and the unload database command:
./startcommander.sh Do you wish to create a new Database. (Yes (Y) or No (N))? [default: N]: Enter product to connect with: (Embedded (E) or Server (S))? [default: E]: e Enter driver to use? [default: [com.pointbase.jdbc.jdbcUniversalDriver]: Enter database URL? [default: [jdbc:pointbase:embedded:sample]: Enter Username? [default: PBPUBLIC]: Enter Password? [default: PBPUBLIC]: PointBase Commander 5.2 ECF build 294 size restricted version EMBEDDED Interactive SQL command language. SunOS/5.9 (C) Copyright 2004 DataMirror Mobile Solutions, Inc. All rights reserved. Licensed to: Sun_customer_demo_use For commercial version contact PointBase at: pointbase.com PHONE: 1-877-238-8798 (US & CANADA) 1-408-961-1100 (International) WEBSITE: www.pointbase.com SQL>unload database sampledb.sql; SQL> unload database sampledb.sql; SQL> 13 Row(s) Unloaded. (PBPUBLIC.CUSTOMER_TBL) SQL> 4 Row(s) Unloaded. (PBPUBLIC.DISCOUNT_CODE_TBL) SQL> 30 Row(s) Unloaded. (PBPUBLIC.MANUFACTURE_TBL) SQL> 11 Row(s) Unloaded. (PBPUBLIC.MICRO_MARKETS_TBL) SQL> 9 Row(s) Unloaded. (PBPUBLIC.OFFICE_TBL) SQL> 4 Row(s) Unloaded. (PBPUBLIC.OFFICE_TYPE_CODE_TBL) SQL> 15 Row(s) Unloaded. (PBPUBLIC.ORDER_TBL) SQL> 6 Row(s) Unloaded. (PBPUBLIC.PRODUCT_CODE_TBL) SQL> 30 Row(s) Unloaded. (PBPUBLIC.PRODUCT_TBL) SQL> 10 Row(s) Unloaded. (PBPUBLIC.SALES_REP_DATA_TBL) SQL> 10 Row(s) Unloaded. (PBPUBLIC.SALES_REP_TBL) SQL> 52 Row(s) Unloaded. (PBPUBLIC.SALES_TAX_CODE_TBL) SQL> 12 Table(s) Unloaded. SQL> quit;
The results from executing the unload database command is written in the above example to the file sampledb.sql. The sampledb.sql file contains all of the DDL required to create the necessary tables and indexes. It also contains the DML to insert the data back into the database. The commander command RUN is intended to be used import the data into another Pointbase database using the script that was generated. Here is an example of what the INSERT statements and associated data look like in the generated file:
INSERT INTO "ADVENTURE"."CATEGORY" ( "CATID", "LOCALE", "NAME", "DESCRIPTION", "IMAGEURI" ) VALUES( ?, ?, ?, ?, ? ); { 'ISLAND ','en_US','Island Adventures','Experience an island / paradise in a way fit for your needs.','Island_Adventures.gif' 'JUNGLE ','en_US','Jungle Adventures','Experience a jungle / paradise in a way fit for your needs.','Jungle_Adventures.gif' 'MOUNTAIN ','en_US','Mountain Adventures','Experience an / elevated paradise with a view.','Mountain_Adventures.gif' 'ORBITAL ','en_US','Orbital Adventures','Experience a vacuum / paradise with a beautiful view and where no one can hear you scream.', / 'Space_Adventures.gif' 'WESTERN ','en_US','Western Adventures','Enjoy the Wild West. / ','Western_Adventures.gif' 'SOUTH_POLE ','en_US','South Pole Adventures','Experience a / frozen paradise in a way fit for your needs.','SouthPole_Adventures.gif' };
You could easily edit the file generated from the commander unload database command so that it only consisted of the DDL (for example, it would not be hard to write a program which would process the insert statements). As a simple test, we use the unload database command against the Pointbase sample database, and then edit the generated script, making the following changes:
Removed the phrase Organization Heap from the end of all CREATE Table statements
Removed the COMMIT command
Changed the Boolean datatype to be smallint
Removed all of the INSERT statements and associated data
Next, a simple Ant script is used to execute the DDL using the sql target. Finally, the same experiment is repeated for the sun-appserv-samples database requiring the following additional changes to the generated SQL file:
Make all changes as described above for the sample database
Remove the create user commands
Remove the SET PATH commands
Change the Decimal precision from 38 to max of 31
Change the float precision from 64 to max of 52
The SPECIFIC keyword for CREATE PROCEDURE is not currently supported
Removed the GRANT commands
Converting Pointbase Java procedures to work with Java DB requires some changes to the Java code as well as to the CREATE PROCEDURE statements. Information on creating Java DB Java procedures can be found in the Derby Reference manual. Support for the Boolean datatype should be in the next release of Java DB.
The embedded Sun Java System Message Queue code that is supplied as part of Application Server is only tested and certified (typically) against the equivalent version of the Message Queue broker. This means that using the supplied embedded Message Queue code to connect to a remote (not managed by Application Server) Message Queue broker running a different version of the Message Queue code is not supported.
This section lists the web servers that are supported for the Sun Java System Application Server 9.1.
Table 2–4 Supported Web Servers
Web Server |
Version |
Operating System |
---|---|---|
Sun Java System Web Server |
6.1, 7.0 |
Solaris SPARC 9, 10 Solaris x86 9, 10 Red Hat Enterprise Linux , 3.0 Update 1 |
Apache Web Server |
1.3+, 1.4, 2.0 |
Solaris SPARC 9, 10 Solaris x86 10 Red Hat Enterprise Linux 2.1 Update 2, 3.0 Update 1 |
Microsoft IISTM |
5.0+ |
Windows Server 2003 Windows 2000 Advanced Server Service Pack 4+ |
Support for additional platforms, including Windows and HP-UX, will be available at a later date.
This section lists the browsers that are supported with the Sun Java System Application Server 9.1.
Table 2–5 Supported Web Browsers
Browser |
Version |
---|---|
Mozilla |
1.7.12 |
Internet Explorer |
6.0 Service Pack 2 |
Firefox |
1.0.7 |
Safari |
2 |
Netscape |
8.0.4 |
In addition to the requirements listed in Hardware and Software Requirements, verify that your system meets the requirements listed below for running HADB.
HADB is only bundled with the Application Server 9.1 Enterprise profile. You can download HADB at ***. Also note that the Java components of the system have been built with JDK 5 and has been tested on JDK 1.5.
Solaris (SPARC) – Solaris 8 MU7, Solaris 9 MU7, Solaris 10 RR.
Solaris (x86) – Solaris 9 MU7, Solaris 10 RR.
RedHat Enterprise Linux - 2.1 U5 (only ext2 file system is supported, not ext3), 3.0 U4 (both ext2 and ext3 are supported. Updates before U4 are not recommended due to excessive swapping). Note that HADB is tested on these operating system versions in 32–bit mode only. Also, note that HADB does not support RedHat Enterprise Linux 3.0 running in 64–bit mode due to a bug in the operating system (see known bug 6249685 in the High Availability section for details about impact on HADB).
Microsoft Windows – Microsoft Windows 2000 Advanced Server Service Pack 4 and Microsoft Windows 2003 Enterprise Edition. Note that HADB does not support any of the forthcoming Microsoft Windows operating system versions in 64–bit mode.
Minimum memory - 320 MB per node.
Minimum free disk space - 70 MB for HADB binaries per host. In addition, disk space is needed for the data devices, 512 MB for a test installation per node.
Recommended memory - 512 MB per node.
Recommended free disk space - 70 MB for HADB binaries per host. In addition, disk space is needed for the data devices, 1200 MB for a test installation per node.
Make sure write caching is disabled on devices storing HADB data and log files. Write caching is enabled by default on some Solaris platforms; for example, Solaris x86.
Minimum memory - 128 MB
Minimum free disk space - 70 MB for HADB binaries per node
Minimum memory - 120 MB
Minimum free disk space - 20 MB
Refer to the Sun Java System Application Server 9.1 Upgrade and Migration Guide for complete instructions for upgrading from a previous version of the Application Server to the current version.
The following additional requirements should be met before installing the Sun Java System Application Server software.
Free space: your temporary directory must have a minimum of 35MB free for Sun Java System Application Server installation, and 250 MB of free space for the SDK installation.
Using the uninstall program: If you need to remove the Application Server from your system, it is important to use the uninstall program that is included with the software. If you attempt to use another method, problems will arise when you try to reinstall the same version, or when you install a new version.
Free ports: You must have seven unused ports available. The installation program automatically detects ports in use and suggests currently unused ports for the default domain. By default, the initial default ports are:
8080 for HTTP, 8181 for HTTPS
3700 for IIOP, 3820 for IIOP/SSL and 3920 for IIOP/SSL with Mutual Authentication
4848 (HTTP) for the Administration Server
8686 (RMI) port for pure JMX Clients
Starting previously-installed servers (UNIX) — unless you are replacing the previously installed server, you should start it before you begin the Sun Java System Application Server 9.1 installation process. This allows the installation program to detect ports that are in use and avoid assigning them for other uses.
Replacing previously-installed servers (UNIX) — Refer to the Sun Java System Application Server 9.1 Upgrade and Migration Guide for complete instructions for upgrading from a previous version of the Application Server.
Shutting down firewall (Microsoft Windows) — You must stop any firewall software before installing the Sun Java System Application Server software, because some of this software disables all ports by default. The installation program must be able to accurately determine which ports are available.
For further compatibility information, see theSun Java System Application Server 9.1 Upgrade and Migration Guide.
The Sun Java System Application Server Enterprise Edition 9.1 supports the Java EE 5 platform. The following table lists the enhanced APIs available on the Java EE 5 platform.
Table 2–6 Major API changes on the Java EE 5 Platform
API |
JSR |
---|---|
Java EE 5 |
|
Web Services Technologies |
|
Implementing Enterprise Web Services | |
Web Service Metadata for the Java Platform | |
Component Model Technologies |
|
Management Technologies |
|
Other Java EE Technologies |
|
Common Annotations for the Java Platform | |
Sun Java System Application Server 9.1 is available as part of the Java EE 5 SDK.
There are two Java EE 5 SDK versions:
In addition, you can download these SDK distributions with the JDK or with the NetBeans 5.5.1 tools. For more information, access the download page at http://java.sun.com/javaee/downloads/index.jsp.
GlassFish V2 and Application Server 9.1 does not work with NetBeans 5.5 for developing Java EE applications. You must use NetBeans 5.5.1.
Sun Java System Application Server 9.1 requires J2SE 5.0 or greater as the underlying JVM. If you want to switch from one Java version to another, perform the following general steps. (Windows and Unix)
Downgrading to an earlier Java version is not recommended after a domain has been created with a newer Java VM. If you must downgrade your JVM, it is recommended that you do it on a per-domain basis. The followiong procedure describes how to do this.
Download the desired Java SDK (not the JRE) and install it on your system, if you have not already done so.
The Java SDK can be downloaded from http://java.sun.com/j2se.
Start the domain for which you want to change the JDK:
as_install/bin/asadmin start-domain domain_name |
Log in to the Admin console and change the JVM attributes for the domain.
In particular, you may want to change the JAVA_HOME variable on the JVM Settings page for the domain.
Alternatively, you can use the asadmin command:
as_install/bin/asadmin set "server.java-config.java-home=Path-To-Java-Home" |
There are two known compatibility issues between Application Server 9.1 and Java ES 5 (JES5).
The JES5 Service Registry is not compatible with Application Server 9.1 because of the JSF 1.2 version provided by Application Server 9.1. The Service Registry needs to be upgraded to JES5u1 prior the Application Server upgrade to 9.1. This limitation is also documented in the Service Registry documentation.
The JES5 Portal Server is not compatible with Application Server 9.1 because of the JSF 1.2 version provided by Application Server 9.1. Portal Server needs to be upgraded to JES5u1 prior the 9.1 upgrade to 9.1.
On a Java ES 5 setup that has Portal Server on Application Server 8.2, upgrading Application Server 8.2 to 9.1 makes the Portal Server unusable. Application Server 9.1 uses JSF 1.2, but the JSF-Portlet bridge in Release 5 Portal Server does not support JSF 1.2. On Solaris/Linux the Portal Server needs to be upgraded to JavaES5 Update 1. On Windows do not upgrade Application Server to 9.1 if you want to continue using the Release 5 Portal Server, as Portal Server is not supported in Java ES 5 Update 1 on Windows.
The Application Server 9.1 Update Center provides automated Application Server updates and easy access to additional components.
When the Update Center is enabled, it performs an automated software update. During this automated update process, the Update Center collects and transmits the following data to Sun Microsystems (or its service provider):
Unique installation ID (GUID)
IP address
Operating system information (name, version, architecture, locale)
JDK version
Module download information (module name, date, time, status, download time, number of bytes downloaded)
No personally identifiable information is tracked. No personally identifiable information is associated with any other data or used for reporting purposes.
To ensure explicit agreement of the automated update, the Update Center is disabled by default. To enable the Update Center to perform periodic checks and automated updates:
Start the Update Center.
On Unix: <installdir>/updatecenter/bin/updatetool
On Windows: <installdir>\updatecenter\bin\updatetool.bat
Select the Preferences tab.
In the Update Scheduling window, change the Check for Updates drop-down box value from Never (Manual) to a desired value. For example, daily or weekly.
Specify the desired day of the week and time of the day for the update.
Select the Save button to save your changes.
The Update Center will now automatically check for Glassfish or Application Server component updates according to the schedule specified. When an update is available, the Update Center will launch and notify you of the component available to update.
For detailed information about WSIT status, refer to the WSIT Status Notes page. Also refer to the The WSIT Tutorial for information about using WSIT with Application Server.