Deploy the Sample Enterprise Beans

Before you can run the samples that use enterprise beans, you must follow these steps to deploy and install the sample enterprise beans using the Administrative Console on WebSphere Application Server 3.0. This procedure puts the enterprise beans into a server-container runtime environment.

The set of sample enterprise beans to deploy consists of five entity beans with container-managed persistence (CMP). These require database access to store their data .

  • Account.jar
  • Increment.jar
  • Leave.jar (YourCo)
  • Audit.jar (YourCo)
  • History.jar (YourCo)

The set of sample enterprise beans also has three session beans which do not require database access.

  • Transfer.jar
  • HelloEJB.jar
  • Access.jar (YourCo)

To install and deploy enterprise beans

  1. Follow the instructions in Managing enterprise beans to install and deploy each of the sample enterprise beans.

    Note that for
    the entity beans with CMP you will need to create a JDBC driver, create a DataSource object, and install the JDBC driver. A DataSource object specifies a database to use to store persistent data. You must do this step once for each database you will use. Tip: If you have already done this for the Connection Pooling sample and want to deploy the enterprise beans in the DB2 SAMPLE database, you can reuse this same DataSource object for all the sample enterprise bean data.

  2. Run the servlet to populate the tables for the YourCo Leave entity bean. This will put initial values in the YourCo employees leave banks.

Things to remember:

  • When a bean is installed, its JAR file is automatically appended to the CLASSPATH environment variable.

  • By default, the JAR file is placed in the directory named <was_root>/bin/WebSphere/DeployedJars, or in the directory specified when WebSphere Application Server Advanced Edition was installed.