Package examples.wtc.atmi.simpFML32
This example demonstrates the ability of WebLogic Tuxedo Connector to allow WebLogic Server to interoperate with Tuxedo using FML32 buffers.See:
Interface Summary
Rstring The methods in this interface are the public face of the simpapp client. RstringHome This interface is the home interface for the TraderBean.java, which in WebLogic is implemented by the code-generated container class TraderBeanC.
Class Summary
Client This class illustrates calling a stateful SessionBean and performing the following exercises: Create a Rstring Buy some shares using the Rstring Sell some shares using the Rstring Remove the Rstring MyFieldTable RstringBean RstringBean is a stateful SessionBean. Package examples.wtc.atmi.simpFML32 Description
This example demonstrates the ability of WebLogic Tuxedo Connector to allow WebLogic Server to interoperate with Tuxedo using FML32 buffers.
The Tuxedo simpFML32 application is extended to run over domains. This allows WebLogic Server clients using FML32 buffers to reference the Tuxedo REVERSE_STRING service. This example consists of a Tuxedo service, simpFML32 that export the service REVERSE_STRING, that expects and returns a FML32 string, in reverse order. A WebLogic Server client invokes the REVERSE_STRING EJB that connects to the Tuxedo service to perform the operation and return the results.
Configure the simpFML32 example:
You need to configure Tuxedo and WebLogic Server.Tuxedo configuration
- Your PATH environment variable needs to include the path of your C compiler. Use
set PATH
to check the status and add the path if necessary.- Copy the simpFML32.c example to your Tuxedo installation and create a working Tuxedo simpFML32 directory
- Change directories to the working Tuxedo simpFML32 directory
- Set environment variables. Update the following parameters:
- TUXDIR - base directory of the TUXEDO Software
- APPDIR - base directory of the sample program
- PATH - must include %TUXDIR%\bin
- TUXCONFIG - full pathname of binary tuxconfig file
- NT/2000 users modify
setEnv.cmd
located at %TUXDIR%. Unix users modify thetux.env
file located at $TUXDIR.- Build the simpFML32 server:
buildserver -o simpFML32 -f simpFML32.c -s REVERSE_STRING
- Copy the ubbdomain and dom1config files from the WebLogic Tuxedo Connector simpFML32 directory to your Tuxedo simpFML32 directory
- Modify the ubbdomain for your Tuxedo environment. This includes setting the pathnames for APPDIR, TUXCONFIG, and TUXDIR and setting the machine name. Replace all
<bracked>
items with information for your environment.Example:
APPDIR="/home/me/simpapp"
TUXCONFIG="/home/me/simpapp/tuxconfig""
TUXDIR="/usr/tuxedo"
- Modify the dom1config for your Tuxedo environment. This includes creating log devices and updating the network addresses.
- Logs
Example:
DMTLOGDEV="d:\my_apps\tlog"
AUDITLOG="d:\my_apps\aud"
DMTLOGNAME="DMTLOG_TDOM1"
- NWADDR
Example:
TDOM1 NWADDR="//TuxedoMachine:1234"
TDOM2 NWADDR="//WTCMachine:5678"
- Load the ubbdomain file
Example:
tmloadcf -y ubbdomain
- Load the dom1config file
Example:
set BDMCONFIG=d:\mydomain\simpFML32\bdmconfig
dmloadcf -y dom1config
- Boot the Tuxedo domain
tmboot -y
- Verify all processes have started using the tmadmin psc command.The following domain processes should have booted:
- DMADM, GWADM, and GWTDOMAIN
- The REVERSE_STRING service offered by the simpFML32 server
WebLogic Server Configuration
- Boot your WebLogic Examples Server
- Make sure that no other WTCServer Mbeans are targeted to the examplesServer
- Change directories to the WebLogic Tuxedo Connector examples simpFML32 directory
- Set environment variables. Update the following parameters:
- Set the APPLICATIONS to the location of the applications directory in your WebLogic Server installation
- Set the CLIENT_CLASSES to build
- NT/2000 users modify and run the
setExamplesEnv.cmd
. Unix users copy./config/examples/setExamplesEnv.sh
script to your WTCsimpFML32
directory, then modify and run the setExamplesEnv.sh script.- Build the
wtc_rstring.jar
file using ant.
- Enter the following command:
ant
- Check to see that the
wtc_rstring.jar
is deployed. Use the WLS console or check the config.xml file. Manually deploy the EJB if needed.- Configure your WTC
simpfml32
service.
- Enter the following command:
ant setwtc
You will be promped for your username, password, and the network addresses for your TDOM2 local Tuxedo access point and your TDOM1 remote Tuxedo access point. The following is an example of a successful configuration:
Buildfile: build.xml
- setwtc:
- [input] Enter system username:
- weblogic
- [input] Enter system password:
- weblogic
- [input] Enter the Network Address for your local access point, TDOM2:
- //WTCMachine:5678
- [input] Enter the Network Address for your remote access point, TDOM1:
- //TuxedoMachine:1234
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- [java] Ok
- BUILD SUCCESSFUL
Note: If you are using a Tuxedo 6.5 service, you will need to set Interoperate in your Local Tuxedo Access Point Connections tab. You will need to untarget the WTC service, set Interoperate to yes, and then target and deploy the WTC service.
Run the example
Start a WebLogic Server client to invoke the Rstring EJB and connect to the Tuxedo REVERSE_STRING service.
- Change directories to the WLS
simpfml32
directory
- Use the following command:
ant run
The service returns the following:
Buildfile: build.xml
- run:
- [java]
- [java] Beginning statefulSession.Client...
- [java]
- [java] Creating Rstring
- [java]
- [java] converting abcdef
- [java] converted to: fedcba
- [java]
- [java] End statefulSession.Client...
- [java]
- BUILD SUCCESSFUL
- Untarget the WTCsimpfml32 service from the examplesServer.
Use TraceLevel
If you have a problem running the simpfml32 example, use the WebLogic Tuxedo Connector tracing feature. Add the TraceLevel attribute to yourstartWebLogic
script.Example: -Dweblogic.wtc.TraceLevel=20000A TraceLevel of 20000 traces all of the calls to the Tuxedo object in the client.There's more....
There are additional features provided by WebLogic Tuxedo Connector to support the FML application program interface (API). For more information about WebLogic Tuxedo Connector FML API implementation, see the Javadocs for the WebLogic Tuxedo Connector.For more information about WebLogic Server WebLogic Tuxedo Connector, see:
- WebLogic Tuxedo Connector Administration Guide
- WebLogic Tuxedo Connector Programmer's Guide
- WebLogic Tuxedo Connector Examples