All Examples All EJB Examples
This example is a package that demonstrates an Enterprise JavaBean. Please run this example before attempting to create your own Enterprise JavaBeans, as it will show you the different steps involved. The example is a Message-Driven bean called MessageTraderBean.
The example demonstrates:
To get the most out of this example, first read through the source code files to see what is happening. Start with the XML deployment files to find the general structure of the EJBean, which classes are used for the different objects and interfaces, then look at Client.java to see how the application works.
To deploy this bean, simply copy build/ejb20_message_trader.jar to the EJB deployment directory of your server (typically, $WLHOME/myserver/ejb_deployments).
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:
We provide separate build scripts for Windows NT and UNIX:
These scripts will build the example and place the files in the correct locations:
$ java examples.ejb20.message.Client
If you're not running the WebLogic Server with its default settings, you will have to run the client using:
$ java examples.ejb20.message.Client "t3://WebLogicURL:Port"
where:
Parameters are optional, but if any are supplied, they are interpreted in this order:
Beginning message.Client... Received new quote : BEAS 40 1/8 Received new quote : SUNW 79 1/2 Received new quote : BEAS 40 1/8 Received new quote : IBM 82 1/4 Received new quote : SUNW 79 1/2 Received new quote : IBM 82 1/4 End message.Client...
Copyright © 1997-2000 BEA Systems, Inc. All rights reserved.
Last updated 03/28/2000