All Examples All EJB Examples
This example is a package that demonstrates how to use home methods. A Home method is a method declared on the Home class and defined in the bean instance, prefixed by "ejbHome". The example is an entity EJBean called AccountBean.
The example demonstrates:
To make this example work, make sure that you can compile and run the examples.ejb.basic.containerManaged example.
This example is shipped "pre-built"; you can either run it as shipped, or build the example and run it to test that you are able to successfully build and run EJBeans.
These three sections cover what to do:
If you're starting the Server from the command line, you'll need to add an entry such as c:/weblogic/eval/cloudscape/lib/cloudscape.jar to the Java system classpath before starting the server, as described in the Administrators Guide Setting up and starting the WebLogic Server.
You can check that the EJBean has been deployed correctly either by checking the server command line window, or by opening the Console and examining "EJB" under the "Distributed objects"; you should see containerManaged.AccountHome deployed, and can monitor its activity.
$ java examples.ejb20.homeMethods.Client
If you're not running the WebLogic Server with its default settings, you will have to run the client using:
$ java examples.ejb20.homeMethods.Client "t3://WebLogicURL:Port"
where:
Parameters are optional, but if any are supplied, they are interpreted in this order:
Beginning ejb20.examples.homeMethods.Client... End ejb20.examples.homeMethods.Client...The server should display a confirmation that the home method was called :
AccountBean.ejbHomeMethod()
Read more about using the EJB deployer tool in the Deploying EJBs with DeployerTool.
Copyright © 1997-2000 BEA Systems, Inc. All rights reserved.
Last updated 03/28/2000