EJB Samples Overview
This topic provides the following sections:
EJB Sample Applications Provided with WLE
WebLogic Enterprise (WLE) provides the following sample applications:
This document describes each of these sample applications, and also explains how to build and run them.
EJB Samples Javadoc
Javadoc for the EJB sample applications is installed in the locations shown in Table 1-1. If you are viewing this document in a browser, you can click the name in the left column to display the related Javadoc.
Table 1-1 EJB Sample Application Javadoc
|
Sample Application
|
Location
|
|
All packages
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\index.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/index.html
|
|
stateless session bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\basic\ statelessSession\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejb/basic\ statelessSession/package-summary.html
|
|
stateful session bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\basic\ statefulSession\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejb/basic\ statefulSession/package-summary.html
|
|
JDBC sequence bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\sequence\ jdbc\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejb/sequence\ jdbc/package-summary.html
|
|
Oracle sequence bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\sequence\ oracle\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejbs/equence\ oracle/package-summary.html
|
|
Parent bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\subclass\ parent\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejb/subclass\ parent/package-summary.html
|
|
Child bean
|
Windows NT:
%TUXDIR%\samples\j2ee\ejb\docs\samples\j2ee\ejb\subclass\ child\package-summary.html
UNIX:
$TUXDIR/samples/j2ee/ejb/docs/samples/j2ee/ejb/subclass\ child/package-summary.html
|
Before you Build and Run the EJB Sample Applications
Each of the subsequent chapters in this guide explain all the steps for building and running each sample. In general, though, note the following about these sample applications:
- The instructions described here are available in the WebLogic online
documentation and also in the following location on the software CD:
Windows NT:
%TUXDIR%\samples\j2ee\ejb
UNIX:
$TUXDIR/samples/j2ee/ejb
- Create a work directory on your machine, and copy the contents of the following
directory into the work directory:
Windows NT:
%TUXDIR%\samples\j2ee\ejb
UNIX:
$TUXDIR/samples/j2ee/ejb
You need to build each sample one at a time. All the samples use the following common build and execute a script, which are located in the preceding directory, for each platform:
Windows NT:
Execute the batch file runme.cmd.
UNIX:
Execute shell script file runme.ksh.
- Before running the build script/batch file for each sample application, make sure
that the following system environment variables are set:
|
Variable
|
Description
|
|
TUXDIR
|
The directory path where you installed the WebLogic Enterprise software. For example:
Windows NT:
TUXDIR=c:\wledir
UNIX:
TUXDIR=/usr/local/wledir
|
|
JAVA_HOME
|
The directory path where you installed the JDK software. For example:
Windows NT:
JAVA_HOME =c:\JDK1.2
UNIX:
JAVA_HOME =/usr/local/JDK1.2
|
|
ORACLE_HOME
|
The directory path where you installed the Oracle software. For example:
ORACLE_HOME=/usr/local/oracle
You need to set this environment variable on UNIX operating systems only.
|
- You may optionally set the following system environment variables prior to
running the build command to change their default value. See the Administration
Guide for more information about selecting appropriate values for these
environment variables.
|
Variable
|
Description
|
|
HOST
|
The host name portion of the TCP/IP network address used by the ISL process to accept connections from Java clients. The default value is the name of the local machine.
|
|
PORT
|
The TCP port number at which the ISL process listens for incoming requests; it must be a number between 0 and 65535. The default value is 2468.
|
|
IPCKEY
|
The address of shared memory; it must be a number greater than 32769 unique to this application on this system. The default value is 55432.
|
|
DB_INSTANCE
|
Name of the database instance or server. The default value for Oracle is Beq-Local. This is needed only for the samples that use a database.
|
|
DB_USER
|
Name of the database user. The default is scott. This is needed only for the samples that use a database.
|
|
DB_PASSWORD
|
Password for the database user. The default is tiger. This is needed only for the samples that use a database.
|
|
DB_DRIVER
|
The Java class name of the database driver. The default is the Oracle 8i driver, weblogic.jdbc20.oci815.Driver.This is needed only for the samples that use a database.
|
|
DB_URL
|
Database connection URL. The default for Oracle is jdbc:weblogic:oracle:Beq-Local. If the database instance is not named, set DB_INSTANCE to null. This is needed only for the samples that use a database.
|
When you enter the tmboot command to start one of the EJB sample applications, the following server processes are started:
- TMSYSEVT
The BEA Tuxedo system Event Broker.
- TMFFNAME
The following TMFFNAME processes are started:
The TMFFNAME server process with the -N option and the -M option is the MASTER NameManager service. The -N option starts the NameManager service; the -M option starts this name manager as a MASTER. This service maintains a mapping of application-supplied names to object references.
The TMFFNAME server process with the -N option only is a SLAVE NameManager service.
The TMFFNAME server with the -F option contains the FactoryFinder object.
- JavaServer
The JavaServer takes one or more EJB JAR files that were created for the application.
- ISL
The IIOP Listener/Handler.
Restoring the Sample Applications Directory to Its Original State
You can restore the sample application directory to its original state by completing the following steps:
- Set the directory to the directory containing the sample application.
- Enter the following command:
Windows NT:
prompt>%TUXDIR%\samples\j2ee\ejb\clean.cmd
UNIX:
prompt>./$TUXDIR/samples/j2ee/ejb/clean.ksh
|