Sun Java System Application Server 

Samples Index

The bmp-simple Sample Application

The bmp-simple application provides a basic example of an application that uses bean-managed persistence (BMP) Enterprise JavaBeans (EJBs). The EJB uses a relational database, which requires you to register a JDBC resource, as described in the following instructions.

Setting up the environment

Before you deploy or run the application, you must ensure that a database resource has been configured for Application Server. The included asant deployment script automatically performs this step for you. But if you are using another deployment mechanism, you must perform it manually.

You can use any JDBC-compliant relational database server, but specific instructions are provided for the following:

Building, Deploying, and Running the Application

The general instructions for building, deploying, and running sample applications are provided in Building, Deploying, and Running Sample Applications. In reading this document, use the following application-specific variables for this application:

Follow this general procedure:

  1. Build the Application. The build file, build.xml, is in the app_dir directory, specifically, install_dir/samples/ejb/bmp/apps/simple.
  2. Deploy the Application The EAR file is install_dir/samples/ejb/bmp/apps/simple/bmp-simple.ear.
  3. Run the Application as described below.

Running the Application

To run the application, execute the bmp-simpleClient.jar in the application client container:

cd app_dir
appclient -client bmp-simpleClient.jar

The appclient executable is located in install_dir/bin/appclient.


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