WebLogic Tuxedo Connector Quick Start Guide
|
WebLogic Tuxedo Connector Quick Start Guide
Note: For more detailed information on how to configure the WebLogic Tuxedo Connector for this WebLogic Server Release, see the WebLogic Tuxedo Connector Programmer's Guide.
The following sections describe how to configure WebLogic Tuxedo Connector to allow WebLogic Server to interoperate with Tuxedo Releases 6.5 and higher:
Configuring the WebLogic Tuxedo Connector
Note: This section summarizes how to configure the WebLogic Tuxedo Connector on a Windows platform. UNIX users can adapt the instructions by making appropriate substitutions such as replacing the "\" with "/" and ".cmd" with ".sh".
This example extends the Tuxedo simpapp application to run over TDomains. This allows clients of the TOUPPER service to run on either Tuxedo or the WebLogic Server examplesServer. The example provides the following services:
- TOUPPER: A Tuxedo service that converts a string to upper case. A WebLogic Server client invokes the TOUPPER EJB and connects to the Tuxedo TOUPPER service.
- Tolower: A service implemented by an EJB in WebLogic Server. The client for the Tolower service runs on Tuxedo.
The following sections describe how to configure WebLogic Tuxedo Connector using the Administration Console:
Set the TraceLevel
Note: For more information on TraceLevel, see Monitoring the WebLogic Tuxedo Connector.
TraceLevel is a WebLogic Server Property. Update the JAVA_OPTIONS variable in the SAMPLES_HOME\server\config\examples\startExamplesServer.cmd file. Example:
JAVA_OPTIONS=-Dweblogic.wtc.TraceLevel=100000
where 100,000 specifies the maximum level of WebLogic Tuxedo Connector tracing.
Build the Simpapp Example
Use the following steps to build the simpapp example:
- Boot your WebLogic examplesServer.
- Open a new shell window and change directories to your SAMPLES_HOME\server\src\examples\wtc\atmi\simpapp directory.
- Set environment variables using the SAMPLES_HOME\server\config\examples\setExamplesEnv.cmd file.
- Build the wtc_toupper.jar file using ant. Enter the following command: ant
- Change directories to the SAMPLES_HOME\server\src\examples\wtc\atmi\simpserv directory.
- Build the wtc_tolower.jar file. Enter the following command: ant
- Click Deployment—> EJB and check to see that the wtc_tolower.jar and wtc_toupper.jar are deployed.
Create a WTCServer MBean
Use the following steps to create and configure a WTCServer MBean using the WebLogic Server Console:
- Click the Services Node.
- Right-click the WebLogic Tuxedo Connector Node.
- Select Configure a New WTCServer.
- Enter the Name of your WTCServer in the Name field. Example: mySimpapp
- Click Create.
Create a Local Tuxedo Domain
Use the following steps to configure a local Tuxedo domain:
- Right-click Local WLS Domains.
- Select Configure a New WTCLocalTuxDom.
- Enter the following values for the following fields on the General tab:
Access Point: TDOM2
AccessPoint ID: TDOM2
Network Address: <the network address and port of your WebLogic Server> Example: //123.123.123.123:5678
- Click Create.
- If you are connecting to a Tuxedo 6.5 domain, do the following:
- Click the Connections tab.
- Set the Interoperate field to Yes.
- Click Apply.
Create a Remote Tuxedo Domain
Use the following steps to configure a remote Tuxedo domain:
- Right-click Remote Tuxedo Domains.
- Select Configure a New WTCRemoteTuxDom.
- Enter the following values for the following fields on the General tab:
Access Point: TDOM1
AccessPoint ID: TDOM1
Local Access Point: TDOM2
Listen Address: <the network address and port of Tuxedo> Example: //123.123.123.123:1234
- Click Create.
Create Exported Services
Use the following steps to configure an exported service:
- Right-click Exported Services.
- Select Configure a New WTCExport.
- Enter the following values for the following fields on the General tab:
Resource Name: TOLOWER
Local Access Point: TDOM2
EJB Name: tuxedo.services.TOLOWERHome
- Click Create.
Create Imported Services
Use the following steps to configure an imported service:
- Right-click Imported Services.
- Select Configure a New WTCImport.
- Enter the following values for the following fields on the General tab:
Resource Name: TOUPPER
Local Access Point: TDOM2
Remote Access Point List: TDOM1
- Click Create.
Deploy the WTCServer MBean
Use the following steps to deploy the WTCServer Mbean to examplesServer:
- Click mySimpapp.
- Click Targets.
- Select examplesServer.
- Click the right-arrow button.
- Click Apply
Register TDOM1 as a WebLogic Server User
Use the following steps to register TDOM1 as a WebLogic Server user:
- Click on the Security node.
- Click on Realms.
- Select your default security Realm.
- Click on Users.
- Click the Configure a new User text link.
- Click DefaultAuthenticator
- In the General tab, do the following:
- Add TDOM1 in the Name field.
- Enter and validate a password.
- Click apply.
Configuring Tuxedo
Use the following steps to configure your Tuxedo domain:
- 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 simpapp example from your Tuxedo installation and create a working Tuxedo simpapp directory.
- Change directories to your working Tuxedo simpapp directory.
- Set environment variables using the setEnv.cmd located at TUXDIR. Update the following parameters:
TUXDIR - base directory of the TUXEDO Software
APPDIR - base directory of the sample program
- Build the clients:
buildclient -o simpcl -f simpcl.c
buildserver -o simpserv -f simpserv.c -s TOUPPER
- Copy the ubbdomain and dom1config files from the SAMPLES_HOME\src\examples\wtc\atmi\simpapp directory to your Tuxedo simpapp directory.
- Copy the tolower.c file from the SAMPLES_HOME\src\examples\wtc\atmi\simpserv directory to your Tuxedo simpapp 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 <braced> items with information for your environment.
Example:
APPDIR="\home\me\simpapp"
TUXCONFIG="\home\me\simpapp\tuxconfig""
TUXDIR="\usr\tuxedo"
- Load the ubbdomain file: tmloadcf -y ubbdomain
- Modify the dom1config for your Tuxedo environment. This includes creating log devices and updating the network addresses.
Example:
DMTLOGDEV="d:\my_apps\tlog"
AUDITLOG="d:\my_apps\aud"
DMTLOGNAME="DMTLOG_TDOM1"
TDOM1 NWADDR="//TuxedoMachine:1234"
TDOM2 NWADDR="//WTCMachine:5678"
- Load the dom1config file.
set BDMCONFIG=d:\mydomain\simpapp\bdmconfig
dmloadcf -y dom1config
- Build the tolower client
buildclient -v -f tolower.c -o tolower
- 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 TOUPPER service offered by the simpserv server
- The TOLOWER service is offered by the GWTDOMAIN server
Run the Example
Run each client to demonstrate interoperability between Tuxedo and WebLogic Server.
WebLogic Server to Tuxedo Interoperability
Start a WebLogic Server client from the SAMPLES_HOME\server\src\examples\wtc\atmi\simpapp directory to invoke the TOUPPER EJB and connect to the Tuxedo TOUPPER service. Use the following command:
run.cmd allcaps
The Tuxedo service replies to your WebLogic Server application with:
Returned string is: ALLCAPS
Tuxedo to WebLogic Server Interoperability
Run the tolower client from the Tuxedo simpapp directory to invoke the Tolower EJB and return the results to the client. Use the following command:
tolower ALLSMALL
The WebLogic Server service replies to your Tuxedo client with:
Returned string is: allsmall