WebLogic Server 6.1 Code Examples, BEA Systems, Inc.

Package examples.iiop.ejb.stateless.tuxclient

This directory contains the tuxedo client which can be used to call a stateless session bean from WebLogic or to call the same stateless session bean on WebLogic through a Tuxedo server. It also can be used to demontrate passing server-to-server information using the underlying WebLogic Tuxedo Connector.

Before you run the client applications in this directory, be sure to build the whole example. This includes building the EJB for WebLogic Server and, if you wish to run through the Tuxedo Server, the necessary files for the Tuxedo Server (iiop/stateless/server/tux) as well.

Trader bean and configuring WebLogic Server

Setting up and configuring Tuxedo Server

Be sure to also take a look at the Tuxedo client code.

Build the client

  1. Set up your development shell as described in Setting up your environment.

  2. Execute the build.xml script provided for this example in the samples\examples\iiop\ejb\stateless\tuxclient directory of your WebLogic Server installation. Make sure you have the proper settings that include the necessary Tuxedo directories in your PATH; make sure you have TUXDIR set to your installation of Tuxedo 8.0 and that you may also need to include the tuxedo8.0/bin and tuxedo8.0/lib directories in your PATH.

Run the Example

  1. Open a separate command-line window in which you will run the client.

  2. Set up the environment for your client as described in Setting up your environment for building and running the examples.

  3. Run the client by executing the Client.exe application:
    Client.exe -ORBid BEA_IIOP -ORBInitRef NameService=corbaloc:iiop:localhost:7001/NameService

    Enter the correct hostname and port for your particular configuration

  4. To run the client through Tuxedo make sure you have built and properly configured the included components necessary for both the Tuxedo server and WebLogic (iiop/samples/examples/ejb/stateless/server/wls and iiop/samples/examples/ejb/stateless/server/tux). Then run the Client.exe application with the following command:
    Client.exe -ORBid BEA_IIOP -ORBInitRef NameService=corbaloc:iiop:ip_address:2468/NameService

    Enter the correct ip address and port for your particular Tuxedo configuration. After running the example view the Tuxedo's ULOG. The information there may be helpful.

  5. To demonstrate server to server connectivity add true to the end of either command:

    Client.exe -ORBid BEA_IIOP -ORBInitRef NameService=corbaloc:iiop://localhost:7001/NameService true

    If you have set up both your environments correctly, the server you have called will make an outbound call to the other server (either Tuxedo or WebLogic) and you should see output in that servers log. In the Tuxedo case, this will be the ULOG from the directory where you booted your Tuxedo Server.

There's more...

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

Copyright © 2001 BEA Systems, Inc. All Rights Reserved.