Sun Microsystems Logo



Sun Java System Application Server 8.1 2005Q1
Sample Applications

If you download the Sun Java System Application Server 8.1 2005Q1 bundle, Quickstart will be the only sample available. The J2EE(TM) 1.4 Tutorial is available for download from the J2EE web site. The J2EE(TM) 1.4 BluePrints are available in three bundles:

The Sun Java System Application Server 8.1 2005Q1 does not include the J2EE 1.4 BluePrints. To install the J2EE 1.4 BluePrints, download and unzip them into the installation directory of the Application Server. Otherwise, if you have downloaded and installed J2EE 1.4 SDK, your installation will contain the J2EE(TM) 1.4 BluePrints samples.

The J2EE 1.4 Tutorial is not part of the J2EE(TM) 1.4 SDK bundle.

Samples Index

A complete list of sample applications is included with the application server.

Quick Start

Before working with the samples, ensure that you've followed the Quick Start Guide in order to familiarize yourself with the features and basic operation of the application server. The Quick Start Guide is available at <install_dir>/docs/QuickStart.html

Before Working With Samples

In addition to following the Quick Start Guide, review the following sections before working with the sample applications.

1. Set Up Your Environment
Before deploying sample applications to Application Server, ensure your application server environment is functioning properly. The basic operations introduced in the Quick Start Guide will help ensure that your environment is configured properly. A key requirement prior to working with the samples is to ensure that the following directory is added to your PATH environment variable:

<install_dir>/bin

If you are either sharing your application server installation with other users or using a user ID that does not have write permissions to the area in which the application server is installed (for example, a non root user using an application server installed under /usr/appserveron Solaris[tm] 9), you should make a copy of the sample applications in your own directory before working with the samples. For more information on creating your own samples environment, see Creating Your Own Samples Environment.

2. Review Samples Directory Structure
The sample applications included in the application server installation are packaged according to a consistent structure. Each sample's directory structure represents a typical source code directory structure layout. For more information on the manner in which the samples are organized, see Samples Directory Structure.

3. Review Using Ant with the Samples
All of the samples include build.xml files that enable you to use the Java[tm]-based Ant build facility to easily recompile, reassemble and redeploy the sample applications. For more information on using Ant with the samples, see Using Ant with the Samples.

4. Review Using PointBase with the Samples
When the PointBase database server is installed as part of the application server installation, the database server includes a prepopulated database containing the tables and data required by the sample applications. For more information on how to use PointBase with the samples, see Using PointBase with the Samples. This section also addresses how to download, install and configure the PointBase server when you are using the application server that is installed as part of a Solaris 9 installation. It also addresses how to configure Pointbase server when using it as part of Sun Java System Enterprise Edition 8.1 2005Q1.

5. Review Using Oracle with the Samples
The samples which require databaseconnections can also work with an Oracle RDBMS. For more information on how to use an Oracle RDBMS with the samples, see Using Oracle with the Samples.

6. Rebuild pre-built applications
Pre-built applications are bundled with each example, so you can deploy the application without first having to rebuild it. However, if you plan to modify the source code and rebuild the application using asant core, the bundled pre-built application is no longer used when deploying the application, the rebuilt application is used for deployment instead. This rebuilt sample will be built in the assemble/ directory to avoid overwriting the original application and will ensure that the newly generated application (not the application that is originally bundled) is used for deployment.

7. Samples domain with pre-deployed applications
During installation you had the option of creating the samples administrative domain, which includes pre-deployed applications. You can see a list of these applications by running the asadmin list command or the Admin Console. To start the Admin Console for the samples domain, in a browser go to the following URL, replacing <hostname> with either localhost or the name of the remote host running the application server. The default port number for the admin server of the samples domain is 4858.

http://<hostname>:4858/asadmin

See the Pre-Deployed Samples Index for further details on pre-deployed samples.

8. Replace localhost and <admin.port>
To start the Admin Console, enter URL http://localhost:<admin.port>/asadmin in a browser,
replacing localhost with the name of the host where your application server is installed and replacing <admin.port> with the value of key admin.port which is located in file <install_dir>/samples/common.properties. For Sun Java System Application Server Platform Edition 8.1 2005Q1, the default URL of the Admin Console is http://localhost:4848/asadmin. For Sun Java System Application Server Enterprise Edition 8.1 2005Q1, the default URL of the Admin Console is https://localhost:4849/asadmin

9. Enterprise Edition
The samples in <install_dir>/samples/ee-samples demonstrate some capabilities of the SJAS Enterprise Edition. Note: These samples are not included in the Platform Edition. The other samples will deploy on the Domain Administration Server only. Before deploying the Enterprise Edition samples, please read the information in <install_dir>/samples/ee-samples/ee-setup.html.

10. Configuring samples for use with Java Enterprise System
Before proceeding with executing the sample applications on an instance of Sun Java System Application Server 8.1 that was installed as part of JES, make sure to specify the location of the Sun Java System Message Queue (MQ) messaging software by setting up the following properties in <install_dir>/samples/common.properties:

To set the above properties open the <install_dir>/config/asenv.conf or <install_dir>/config/asenv.bat file. Note down the values of AS_IMQ_LIB and AS_IMQ_BIN.

Now set com.sun.aas.imqLib to the value of <AS_IMQ_LIB>.
Set com.sun.aas.imqHome to ${com.sun.aas.installRoot}/domains/${domain.name}/imq.
Set com.sun.aas.imqUserMgr to the value of <AS_IMQ_BIN>/imqusermgr
Set com.sun.aas.imqInstallDir to ${com.sun.aas.imqLib}/../


Getting Help

If you encounter problems while running the samples, please access the Sample Applications topic in the Application Server area of the Sun Software Forums - Developer Forums.