The Sun JavaTM System Application Server Platform Edition 9 is a Java EE 5 platform-compatible server for the development and deployment of Java EE applications and Java technology-based web services.
This section includes:
The Sun Java System Application Server Platform Edition 9 implements many new features:
Java EE 5 platform support — Sun Java System Application Server Platform Edition 9 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 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, in Java EE 5 Platform APIs
Improved Developer Productivity — Application Server 9 provides a rich developer experience with its open modular extensible architecture and lightweight, low footprint, high performance runtime. Fast application deployment makes iterative application development quick and easy. The product can be easily integrated into popular IDEs. NetBeans and Sun Java Studio Creator integrate Application Server 9, providing a superior development environment.
Java 2 Standard Edition 5.0 Support — Application Server 9 supports Java 2 Standard Edition 5.0, which includes enhanced management and monitoring features and many performance and scalability improvements.
Sophisticated Administration — Application Server 9 provides remote secure management using a browser-based Administration Console and a scriptable command line interface. New Admin Console features include:
Comprehensive web services management support including web services discovery, management, monitoring, and provisioning.
Enhanced application monitoring, visualization, and diagnosis.
JMX MBean API to provide for remote secure programmatic administration and monitoring using JMX.
Built-in management rules and triggers that can be expanded programmatically.
Platform Support — Application Server 9 supports wide range of operating systems, databases, web servers, locales, and hardware. See the Platform Requirements later in these notes for the complete list.
64-bit Support — Application Server 9 adds support for the 64-bit Solaris Operating System.
Java Web Services Developer Pack Integration — Application Server 9 is integrated with the Java Web Services Developer Pack (Java WSDP) 2.0 to provide support for the latest web services standard--including Web Services Metadata 1.0 (specifies annotations for web services), JAX-WS 2.0 (specifies web services API for Java platform), and JAXB 2.0 (specifies Java and XML binding). In addition, it includes a Java EE Service Engine based on the Java Business Integration (JBI) standard.
JMS Connectivity — Application Server 9 provides built-in connectivity with IBM MQ Series and Sun Java System Message Queue Server.
Long-Running Transactions — Application Server 9 adds support for long-running distributed transactions.
JDBCTM Drivers — Application Server 9 connects to any database server with a JDBC driver. For a list of components that Sun has tested and found to be acceptable for constructing Java EE compatible database configurations, see JDBC Drivers and Databases later in these notes. Application Server includes DataDirectTM JDBC drivers for major databases that can be used for deployment.
Java DB Database — Application Server 9 bundles a Java DB database based on the Apache Derby database, making it possible to develop and deploy end-to-end Java EE applications.
Call Flow Monitoring — Application Server 9 can be configured to monitor an incoming request as it flows through various containers in the application server, and through the user application code. For example, the Application Server can break down the time spent in the web container, web application code, EJB container, and EJB application code. The collected information is stored in a database, and is then available for query and analysis.
Self Management Rules — Application Server 9 provides a powerful and flexible infrastructure to automate application server management tasks. A self-management rule consists of an event and an action. Examples of events include message logging, monitoring threshold, timer, and JMX notifications. Actions are logic defined by the user, which are then encapsulated in a JMX MBean. When an event is triggered, and it matches one of the events defined in a self management rule, the associated action will be executed. For example, an administrator might define a management rule such that he or she receives an email when a SEVERE message is logged in the application server.
Migration and Upgrade Tools — Included tools enable you to verify Java EE applications for standards conformance and portability, help with migrations from other Java EE application servers (JBoss, WebLogic, WebSphere), and aid in upgrading from previous versions of Sun's Application Servers. These migration tools are also available separately at http://java.sun.com/j2ee/tools/migration/index.html
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 Platform Edition 9 is based on the source code developed by Sun engineers and the GlassFish community.
This section lists the requirements that must be met before installing the Sun Java System Application Server Platform Edition 9 product.
The following table lists the operating systems with which the Sun Java System Application Server Platform Edition 9 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 (when available) |
64–bit Sun Solaris 10 (SPARC, x86) |
512 MB |
512 MB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 (when available) |
Redhat Enterprise Linux 3.0 U1, 4.0 |
512 MB |
1 GB |
250 MB free |
500 MB free |
J2SE 5.0 Java SE 6 (when available) |
Windows Server 2000 SP4+ Windows 2000 Advanced Server SP4+ Windows Server 2003 Windows XP Pro SP1+ |
1 GB |
2 GB |
500 MB free |
1 GB free |
J2SE 5.0 Java SE 6 (when available) |
On UNIXTM, you can check your operating system version using the uname command. Disk space can be checked using the df command.
You must 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.
For the current list of required patches for Sun Java System Application Server Platform Edition 9 go to http://sunsolve.sun.com and select Patches and Updates. Follow the Sun Java System Application Server Platform Edition 9 links. As operating system patch requirements change and patches to Java Enterprise System components become available, updates will be made available on SunSolve, initially in the form of recommended patch clusters.
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.
Table 2–2 lists databases and drivers that meet the Java EE compatibility requirements. All supported configurations of the Sun Java System Application Server Platform 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 |
---|---|---|
Java DB Network Client |
Type 4 |
Apache Derby 10.1 |
DataDirect 3.5 |
Type 4 |
Oracle 9i, 10g |
Table 2–3 lists all the additional databases and drivers Sun has tested internally.
Table 2–3 Additional Supported JDBC Drivers and Databases
JDBC Driver Vendor |
JDBC Driver Type |
Supported Database Server |
---|---|---|
DataDirect 3.5 |
Type 4 |
Sybase ASE 12.5, 15 Microsoft SQL Server 2000, 2005 IBM DB2 8.1, 8.2 |
IBM |
Type 2 |
IBM DB2 8.1, 8.2 |
Microsoft MS SQL |
Type 4 |
SQLServer 2000, 2005 |
MySQL Connector/J Driver 3.1 |
Type 4 |
MySQL 5 |
Oracle |
Type 4 |
Oracle 9i, 10g |
Postgres |
Type 4 |
Postgres 8.1 |
Sybase |
Type 4 |
ASE 12.5, 15 |
In general, the Application Server Platform Edition 9 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. Java DB is based on the Apache Derby database.
Sun Java System Application Server 9 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] |
The Java DB configuration that ships with Application Server 9 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.
This section lists the browsers that are supported with the Sun Java System Application Server Platform Edition 9 administration console and Quick Start Guide. The browsers supported when running applications on the Application Server depend on the applications being run.
Table 2–4 Browsers Supported
Browser |
Version |
---|---|
Mozilla |
1.4, 1.5, 1.6, 1.7.x |
Netscape Navigator |
6.2, 7.0 |
Internet Explorer |
5.5 Service Pack 2, 6.0 |
Firefox |
1.x |
Refer to the Sun Java System Application Server Platform Edition 9 Upgrade and Migration Guide for complete instructions for upgrading from a previous version of the Application Server to the Sun Java System Application Server Platform Edition 9.
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 200 MB 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 settings. By default, the initial default ports are 8080 for HTTP, 8181 for HTTPS, and 4848 for the Administration Server.
The installation program will detect used ports and assign two others for you: Sun JavaTM System Message Queue (by default, 7676), and IIOP (by default, 3700 for IIOP and 3820 and 3890 for IIOP/SSL). If these default port numbers are in use, the installation program will assign a random port number from the dynamic port range (note that this may not be the next available port number).
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 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) – If you have an older version on the Sun Java System Application Server installed that you wish to replace with the current Application Server, you should stop it before installing the new 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 the Sun Java System Application Server Platform Edition 9 Upgrade and Migration Guide.
The Sun Java System Application Server Platform Edition 9 supports the Java EE 5 platform. The following table lists the enhanced APIs available on the Java EE 5 platform.
Table 2–5 Major API changes on the Java EE 5 Platform
API |
JSR |
---|---|
Java EE 5 |
|
Web Services Technologies |
|
Implementing Enterprise Web Services | |
Java API for XML-Based Web Services (JAX-WS) 2.0 | |
Java API for XML-Based RPC (JAX-RPC) 1.1 | |
SOAP with Attachments API for Java (SAAJ) | |
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 is available as part of the Java EE 5 SDK.
There are three Java EE 5 SDK versions:
In addition to Application Server, the Java EE 5 SDK includes Java 2 Platform Standard Edition 5.0 Update 6, Java EE 5 Samples, Java BluePrints, and API documentation (Javadoc).
Java EE 5 SDK SOA Starter Kit Preview also includes the Project Open ESB Starter Kit that implements an enterprise service bus (ESB) runtime based on the JSR 208 specification for Java Based Integration (JBI). It contains a BPEL service engine, Java EE service engine, HTTP SOAP binding component, and examples of how to use the BPEL service engine.
Java EE 5 Tools Preview Bundle adds NetBeans 5.5 Beta, NetBeans Enterprise Pack 5.5, and Sun Java System Access Manager 7.1, but not J2SE 5.0.
For more information on the other SDK components, see:
Sun Java System Application Server 9 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)
Download the 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.
Completely stop the Application Server.
You can use the following command line:
as-install/bin/asadmin stop-domain |
Alternatively, you can use the Administration Console GUI:
Edit the install_dir/config/asenv.conf file (asenv.bat on Windows), changing the value for AS_JAVA to point to the new J2SE home directory.
Edit the as-install/samples/common.properties file, changing the line beginning com.sun.aas.javaRoot... to reference the new J2SE home directory.
Restart the Application Server.
as-install/bin/asadmin start-domain |