|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. |
See:
Description
Interface Summary | |
Trader | The methods in this interface are the public face of TraderBean. |
TraderHome | This interface is the home interface for the TraderBean.java, which in WebLogic is implemented by the code-generated container class TraderBeanC. |
Class Summary | |
TraderBean | TraderBean is a stateless Session Bean. |
TradeResult | This class reflects the results of a buy/sell transaction. |
This example demonstrates using a variety of clients to call a stateless EJB through a Tuxedo Server or directly through WebLogic. Also it demonstrates passing server-to-server information using the underlying WebLogic Tuxedo Connector in conjunction with a Tuxedo client. This specific package contains the necessary files to build the EJB used in these examples. You must first build the EJB before you can execute any of the clients, or run the Tuxedo server.
Note: If you are interested in how Tuxedo and Corba clients call an EJB on WebLogic, it is recommended to use this example as reference, rather than the WLStrader example included in the Tuxedo 8.0 distribution.
This example illustrates how to call a stateless session bean from a variety of client applications using RMI-IIOP. It uses Inprise Visibroker 4.1 for C++. If you wish to run any of the Tuxedo clients or Tuxedo Servers, you must have Tuxedo 8.0 or later. These examples use a stateless session EJB called TraderBean and presumes some knowledge of EJB deployment. For examples pertaining strictly to EJBs, please see our EJB examples page. Included there is a stateless session bean similar to TraderBean.
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 EJB, i.e. which classes are used for the different objects and interfaces, then examine the other files to see how the applications work. There are three different clients that can be executed to call the EJB. Examine the XML build file carefully for each one. Take special note to see how the idl files are created for the C++ and Tuxedo clients.
The following section describes how to build and run the example:
iiop.properties
file contained in the WL_HOME\samples\examples\iiop
directory. This file must point to your installation
of Visibroker. For example: INPRISE_HOME=c:/Inprise/vbroker
$ mkdir build build\META-INF build\images
$ copy *.xml build\META-INF
$ copy *.gif build\images
<env-entry>
in the ejb-jar.xml
that contains the foreignOrb
property, If you are using Tuxedo, this descriptor contains the address the bean will connect to when
doing outbound calls.
ejbc
on the jar file. Notice the use of the -iiop option.
WL_HOME/config/examples/examples/clientclasses
).
Additional information on using the build scripts is found in Building Enterprise JavaBean examples
RMI Client C++ CORBA Client (requires visibroker 4.1)
Tuxedo CORBA Client (requires Tuxedo 8.0)
Also, you can run the Tuxedo client through the Tuxedo Server as well as make outbound calls form WebLogic to Tuxedo with each client:
Read more about WebLogic RMI over IIOP in the Developer Guide, Using WebLogic RMI over IIOP.
Read more about WebLogic EJB in the Developer Guide, BEA WebLogic Server Enterprise JavaBeans.
Read more about WebLogic RMI in the Developer Guide, Using WebLogic RMI.
For more information about WebLogic Server WebLogic Tuxedo Connector, see:
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |