WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

Package examples.ejb 1.1

The examples in this package illustrate different aspects of using 1.1 Enterprise JavaBeans.

See:
          Description

Examples Summary
examples.ejb11.basic.beanManaged An entity EJB with bean-managed JDBC persistence. The code in the EJB directly access the data storage. Client examples include a single client.
examples.ejb11.basic.containerManaged An entity EJB with container-managed JDBC persistence. The code in the EJB never touches the data storage. Demonstrates using finder methods and the WebLogic is-modified-method-name extension to the EJB 1.1 Specification for optimizing calls to the underlying datastore.
examples.ejb11.basic.statefulSession A stateful session EJB.
examples.ejb11.basic.statelessSession A stateless session EJB.
examples.ejb11.extensions.readMostly EJB demonstrating the user of read-mostly pattern. Demonstrates use of read-only and read-write entity EJBs.
examples.ejb11.subclass A stateless session EJB that demonstrates inheritance in EJB code.
 

Package ejb 1.1 Description

These examples demonstrate different aspects of 1.1 Enterprise JavaBeans. It is a good idea to run all of these examples before attempting to create your own 1.1 Enterprise JavaBeans. They will show you the different steps involved.

Pre-Built Examples

The EJB 1.1 examples included in the WebLogic Server 7.0 distribution are NOT shipped pre-built. To run these examples, you must follow the instructions in the individual example's package-summary.html file for instructions on how to buuild, configure and run the examples.

Quick Guide to the EJB 1.1 Examples

The following table lists all of the EJB 1.1 examples by the feature demonstrated in the example. Note that this table includes EJB examples from other packages (cluster, jolt, etc.).

If you're interested in... ...then look at these examples:
Entity EJBs
The WebLogic entity bean extension isModified
Finders and finder expressions
Session EJBs
Calling an EJB from another EJB
Using inheritance in EJB code
Using EJBs in WebLogic clusters

Building and Running the Examples

  1. Read the instructions for each example, found at the links above.

  2. Set up your development environment as described in Setting your development environment.

  3. Depending on the example, set up any special properties, such as database persistence.

  4. Most examples in this package are preconfigured to work with the PointBase Database which is part of the WebLogic Server distribution. However, if you need or want to run a specific example with Oracle, use the Oracle database setup instructions.

  5. Build each example, using the provided build scripts or makefile. We've provided instructions on using the build scripts.

    Certain examples build Jar files that contain multiple beans:

    Note that certain examples depend on other beans being built first:

  6. You can deploy each EJB by running the build script that places the EJB in WL_HOME\samples\wlserver7.0\config\examples\applications in the WebLogic Server distribution, where it automatically deploys once the server is started. If you are already running the server and build another EJB, it is automatically placed in this directory and instantly deployed.

    If you build an example EJB with the supplied build scripts and deploy it, you can run the build script again and redeploy the bean from the same .jar.

  7. Refer to the specific instructions for each example to run that example.


Documentation is available at
http://e-docs.bea.com/wls/docs70/

Copyright © 2002 BEA Systems, Inc. All rights reserved.