WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

Package examples.iiop.ejb.stateless.rmiclient

This directory contains an RMI java client which can be used to call a stateless session bean from WebLogic and then make an outbound call to Tuxedo using underlying WebLogic Tuxedo Connector technology.

See:
          Description

Class Summary
Client This class illustrates calling a stateless Session Bean and performing the following exercises: Create a Trader Buy some shares using the Trader Sell some shares using the Trader Remove the Trader
 

Package examples.iiop.ejb.stateless.rmiclient Description

This directory contains an RMI java client which can be used to call a stateless session bean from WebLogic and then make an outbound call to Tuxedo using underlying WebLogic Tuxedo Connector technology. The source code for all the RMI-IIOP examples is in your WL_HOME\samples\wlserver7.0\src\examples\iiop directory.

Before you run the client applications in this directory, be sure to build the full example. This includes building the WebLogic Server and, if you wish to run an outbound call to the Tuxedo Server, the Tuxedo Server (WL_HOME/samples/examples/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 RMI client code.

    Build the client

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

    2. Execute the build script provided for this example in the examples\iiop\ejb\stateless\rmiclient directory of your WebLogic Server installation.

    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. Make sure you have TOBJADDR set in your client's environment. Set it to your ip address and port that Tuxedo are running on, for example set TOBJADDR=//172.17.14.29:2468

    4. You will have to run the client form the rmi client directory. The JDK requires a security policy file in order to download stubs from the server and we have provided one in the WL_HOME/samples/wlserver7.0/src/examples/iiop/rmi/rmiclient directory. The build script included in this example also contains the command needed to run the client. Check the build.xml script provided in the examples\iiop\ejb\stateless\rmiclient directory to make sure it is using your correct port and hostname. The last section of this xml file contains the run command. Run the client by entering:

      ant run

    5. Appending "true" to the command sends a call to the Tuxedo Server domain registered by WebLogic. For example, to test WebLogic to Tuxedo connectivity, set up Tuxedo and add 'true' to the end of the arg line in the run portion of the build.xml. The client will run by executing by executing:
      java -Djava.security.manager -Djava.security.policy=java.policy
      examples.iiop.ejb.stateless.rmiclient.Client iiop://ip_address:7001 true
      

    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 on how to provide interoperability between WebLogic Server applications and Tuxedo services, see WebLogic Tuxedo Connector.


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

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