|
|
| WebLogic Server 6.1 Code Examples, BEA Systems, Inc. |
Package examples.wtc.atmi.simpFML32
This example demonstrates the ability of WebLogic Tuxedo Connector to allow WebLogic Serverto interoperate with Tuxedo using FML32 buffers.
See:
Description
|
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 Serverto 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_STRINGservice. This example consists of a Tuxedo service, simpFML32that export the service REVERSE_STRING, that expects and returns a FML32string, in reverse order. A WebLogic Server client invokes the REVERSE_STRINGEJB that connects to the Tuxedo service to perform the operation and returnthe 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 createa 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 the tux.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 ConnectorsimpFML32directory to your Tuxedo simpFML32 directory
- Modify the ubbdomain for your Tuxedo environment. This includessetting the pathnames for APPDIR, TUXCONFIG, and TUXDIR and setting themachine name. Replace all
<bracked> items with information for your environment. APPDIR="/home/me/simpapp"
TUXCONFIG="/home/me/simpapp/tuxconfig""
- Modify the dom1config for your Tuxedo environment. This includescreating log devices and updating the network addresses.
DMTLOGDEV="d:\my_apps\tlog"
AUDITLOG="d:\my_apps\aud"
DMTLOGNAME="DMTLOG_TDOM1"
TDOM1 NWADDR="//TuxedoMachine:1234"
TDOM2 NWADDR="//WTCMachine:5678"
- Load the ubbdomain file
- Load the dom1config file
set BDMCONFIG=d:\mydomain\simpFML32\bdmconfig
- Boot the Tuxedo domain
- Verify all processes have started using the tmadmin psc command.Thefollowing domain processes should have booted:
- DMADM, GWADM, and GWTDOMAIN
- The REVERSE_STRING service offered by the simpFML32 server
WebLogic Server Configuration
- 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 directoryin your WebLogic Server domain
- 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 WTC qsample directory, then modify and run the setExamplesEnv.sh script. - Build the
wtc_rstring.jar file using ant. - Enter the following command:
ant
- Modify the bdmconfig.xml file with information specific to yourinstallation:
- Update the NWAddr attributes of TDOM1 and TDOM2 domains for your environment
- If you are using a Tuxedo 6.5 service, add the Interoperate flag <Interoperate>Yes</Interoperate>
- Use the following command to validate the bdmconfig.xml file usingthe WTCValidateCF utility:
java weblogic.wtc.gwt.WTCValidateCF bdmconfig.xml
- Change directories to the simpFML32 directory
- Boot your WebLogic Server application server
- 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 a WebLogic Tuxedo Connector StartUp Class. You need to provide a classname and thefully qualified name of the bdmconfig.xml file you are using forthe example.
- Set the classname to: weblogic.wtc.gwt.WTCStartup
- Set the arguments field to: BDMCONFIG=path_name_of_your_bdmconfig.xml_file
- Configure a WebLogic Tuxedo Connector ShutDown Class
- Set the classname to: weblogic.wtc.gwt.WTCShutdown
- Shutdown and restart your WebLogic Server application server.
- The Rstring EJB is deployed in your WebLogic Server application server
Run the example
Start a WebLogic Server client to invoke the Rstring EJB and connect to the TuxedoREVERSE_STRING service.- Change directories to the WebLogic Server simpFML32 directory
- Start a client
- For NT/2000, use the following command: run.cmd abcdef
- For Unix, use the following command: run.sh abcdef
- Example:
run abcdef
The Tuxedo service replies to your WebLogic Server application with: Returned string is: fedcba
Use TraceLevel
If you have a problem running the simpapp example, use the WebLogic Tuxedo Connectortracing feature. Add the TraceLevel parameter to the StartUp Class Argumentlist.Example: BDMCONFIG=path_to_my_bdmconfig.xml_file,TraceLevel=20000
A TraceLevel of 20000 traces all of the calls to the Tuxedo object in theclient.There's more....
There are additional features provided by WebLogic Tuxedo Connector to support the FML applicationprogram 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:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.