WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

Package examples.iiop.ejb.stateless.tuxclient

This directory contains the secure tuxedo client which can be used to call a stateless session bean from WebLogic. It is an example of a Tuxedo IIOP client that authenticates itself against WebLogic Server.

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. Note how the authentication is set up. All source files are located in the WL_HOME\samples\server\src directory.

Build the client

  1. Start up your WebLogic Examples Server

  2. Open the Administration Console. In the left-hand frame, click on the 6.x security section. You have a weblogic 'user.' Note how this security information is matched in the c++ code:
    
    
    // authenticate
            cout << "Authenticating against the SecurityService" << endl;
            weblogic::security::acl::DefaultUserInfoImpl_var user 
              = new weblogic_security_acl_DefaultUserInfoImpl_i
              (new ::CORBA::WStringValue((const wchar_t*)(L"weblogic")),
               new ::CORBA::WStringValue((const wchar_t*)(L"weblogic")));
            service->authenticate(user);
    		

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

  4. Execute the build.xml script provided for this example in the samples\examples\iiop\ejb\stateless\sectuxclient 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. 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\tuxclient 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

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/docs61


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