Sun Java System Application Server 

Samples Index

Sun Java System Application Server 9.0 Sample Applications

This document provides important information about the Sun Java System Application Server sample applications. Please review it before using the samples.

Samples, Blueprints, and Tutorials

With the Sun Java System Application Server 9.0 "separate bundle," Quickstart is the only sample available. The "all-in-one" bundle and the samples bundle include a complete set of sample applications.

Blueprints

The Java BluePrints are a now part of the java.net community. Refer to blueprints.dev.java.net for more information.

Tutorials

The Java EE Tutorial is available for download and browsing online.

Setting Up Your Environment

Before working with the sample applications, you must set up Application Server environment. Follow the basic stes in the Quick Start Guide to configure your environment. In particular, be sure your system's PATH environment variable includes install_dir/bin.

Create a private "working" copy of the sample applications if you are:

For more information on creating your own samples environment, see Creating Your Own Samples Environment.

Reviewing Samples Directory Structure

The Application Server sample applications have a consistent directory structure. that are a good example of how to structure source code, component modules, deployment descriptors, and other files. For more information, see see Samples Directory Structure.

Using Ant with the Samples

Each sample includes one or more build.xml files that are used by Ant, the Java-based build tool. Ant enables you to easily recompile, reassemble and redeploy the sample applications. For more information, see Using Ant with the Samples.

Using Databases with the Samples

Some sample applications require a database. You can use any JDBC-compliant database, but setup scripts and instructions are provided only for the following:

Rebuilding Sample Applications

Many of the sample applications include a pre-built application archive that is ready to be deployed. However, if you modify the source code, you must rebuild the application and deploy the new application archive (or redeploy it, if you've already deployed it). When you rebuild an application, the application archive will be built in the sample application's assemble sub-directory to avoid overwriting the original This will also ensure that the modified application is deployed.

Using the Samples Domain with Pre-deployed Applications

Application Server installation provides the option to create a "samples" administrative domain, including some pre-deployed applications. To see a list of these applications, use the command asadmin list. You can also use the Admin Console to view the deployed applications. To start the Admin Console for the samples domain, load the following URL in your browser:

http://hostname:4858/asadmin

Replace hostname with either the name of the remote host running Application Server or localhost. The default port number for the admin server of the samples domain is 4858.

For more information, see the List of Pre-Deployed Samples.

Using Admin Console

The Admin Console is a browser-based graphical interface for administrating Application Server. To start the Admin Console, enter this URL in a browser:

http://hostname:port_num/asadmin
with Platform Edition or
https://hostname:port_num/asadmin
with Enterprise or Standard Edition (note the use of https for security). In these URLs, hostname is the name of the machine running Applcation Server (or localhost if running on the local machine), and port_num is the port on which the samples administration server is running. The port number is the value of admin.port in install_dir/samples/common.properties.

For Application Server Platform Edition, the default URL of the Admin Console is http://localhost:4848/asadmin. For Application Server Enterprise Edition, the default URL of the Admin Console is https://localhost:4849/asadmin.

Using Samples with Application Server Enterprise Edition

The samples in install_dir/samples/ee-samples demonstrate some capabilities of Application Server 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 /samples/ee-samples/ee-setup.html.

Configuring Samples with Java Enterprise System

If you are using Application Server installed as part of Java Enterprise System, you must specify the location of Sun Java System Message Queue (MQ) messaging software before running sample applications. To do this, set the following properties in install_dir/samples/common.properties:

Find the values of AS_IMQ_LIB and AS_IMQ_BIN in the configuration file install_dir/config/asenv.conf (on Solaris or Linux) or install_dir/config/asenv.bat (on Windows).

Getting Help

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


Copyright © 2006 Sun Microsystems, Inc. All rights reserved.