This document provides examples that show how to use the Oracle WebLogic Server Administration Console to configure Oracle WebLogic Tuxedo Connector so that Oracle WebLogic Server can interoperate with Tuxedo Releases 6.5 and higher.
For this release of Oracle WebLogic Tuxedo Connector (WTC), samples are available on the Oracle Technology Network web site. Create a wtc
directory within the samples directory of your WebLogic Server installation. Extract the contents of the wtc_90.tar
to this directory. To run the samples referenced in this document, you must download the simpapp and simpserv samples.
Note:
This section summarizes how to configure the Oracle 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 Oracle Tuxedo simpapp
application to run over Oracle Tuxedo Domains (TDomains). This allows clients of the TOUPPER
service to run on either the Oracle Tuxedo server or the Oracle WebLogic Server examplesServer
. The example provides the following services:
TOUPPER
: An Oracle Tuxedo service that converts a string to upper case. A Oracle WebLogic Server client invokes the TOUPPER EJB
and connects to the Oracle Tuxedo TOUPPER
service.
Tolower
: A service implemented by an EJB in Oracle WebLogic Server. The client for the Tolower
service runs on Oracle Tuxedo.
The following sections describe how to configure Oracle WebLogic Tuxedo Connector using the Administration Console:
Note:
You may want to enable tracing to monitor Oracle WebLogic Tuxedo Connector. See Chapter 10, "Monitoring the WebLogic Tuxedo Connector."
Use the following steps to build the simpapp
example:
Boot your Oracle WebLogic examplesServer.
Open a new shell window and set environment variables using the ORACLE_HOME
\user_projects\domains\wl_server\setExamplesEnv.cmd
file.
Change directories to the location where you have downloaded the simpapp sample. For example, EXAMPLES_HOME
\wl_server\examples\src\examples\wtc\atmi\simpapp
directory. For more information on the WebLogic Server code examples, see "Sample Applications and Code Examples" in Understanding Oracle WebLogic Server.
Build the wtc_toupper.jar
file using ant. This will deploy the EJB on Oracle WebLogic Server. Enter the following command: ant
Change directories to the location where you have downloaded the simpserv sample. For example, EXAMPLES_HOME
\wl_server\examples\src\examples\wtc\atmi\simpserv
directory.
Build the wtc_tolower.jar
file. This will deploy the EJB on Oracle WebLogic Server. Enter the following command: ant
Launch the WebLogic Server Administration Console in your browser. Use the following URL: http://your_machine:7001/console
. Replace your_machine
with the IP address for your machine or your machine name.
In the navigation tree, click Deployments and confirm that the wtc_tolower.jar
and wtc_toupper.jar
are deployed.
Use the following steps to create and configure a WTC server using the Oracle WebLogic Server Administration Console:
Expand Interoperability and select WTC Servers in the navigation tree.
On the WTC Servers page, click New.
On the Create a New WTC Server page, enter the name of your WTC server in the Name field. Example: mySimpapp
Click OK.
Your new WTC server appears in the WTC Servers list.
Note:
When configuring the Network Address for a local access point, the port number used should be different from any port numbers assigned to other processes. Example: Setting the Network Address to //mymachine:7001
is not valid if the Oracle WebLogic Server listening port is assigned to //mymachine:7001
.
Use the following steps to configure a local Oracle Tuxedo access point:
In the WebLogic Server Administration Console, expand Interoperability and select WTC Servers.
On the WTC Servers page, select the name of a WTC server, such as mySimpapp, to access the settings page.
Select Configuration > Local APs.
Enter the following values for the fields on the WTC Local Access Points page:
Access Point: myLocalAp
AccessPoint ID: TDOM2
Network Address: the network address and port of your local access point
Example: //123.123.123.123:5678
Click OK.
If you are connecting to a Tuxedo 6.5 domain, do the following:
Select Connections.
Set the Interoperate field to Yes.
Click Save.
Use the following steps to configure a remote Oracle Tuxedo access point:
In the WebLogic Server Administration Console, expand Interoperability and select WTC Servers.
On the WTC Servers page, select the name of a WTC server, such as mySimpapp.
Select Configuration > Remote APs.
Enter the following values for the fields on the WTC Remote Access Points page:
Access Point: myRemoteAP
AccessPoint ID: TDOM1
Local Access Point: myLocalAp
Network Address: the network address and port of your remote access point
Example: //123.123.123.123:1234
Click OK.
Use the following steps to configure an exported service:
In the WebLogic Server Administration Console, expand Interoperability and select WTC Servers.
On the WTC Servers page, select the name of a WTC server, such as mySimpapp.
Select Configuration > Exported.
Enter the following values for the fields on the WTC Exported Services page:
Resource Name: TOLOWER
Local Access Point: myLocalAp
EJB Name: tuxedo.services.TOLOWERHome
Remote Name: TOLOWER
Click OK.
Use the following steps to configure an imported service:
In the WebLogic Server Administration Console, expand Interoperability and select WTC Servers.
On the WTC Servers page, select the name of a WTC server, such as mySimpapp.
Select Configuration > Imported.
Enter the following values for the fields on the WTC Imported Services page:
Resource Name: TOUPPER
Local Access Point: myLocalAp
Remote Access Point List: myRemoteAP
Remote Name: TOUPPER
Click OK.
In the WebLogic Server Administration Console, expand Interoperability and select WTC Servers.
On the WTC Servers page, select the name of a WTC server, such as mySimpapp.
Select Targets.
Select the examplesServer.
Click Save.
Use the following steps to register TDOM1 as an Oracle WebLogic Server user:
Click Security Realms in the navigation tree.
Click myRealm.
Select Users and Groups.
Click Users.
Click Lock & Edit.
Click New.
In the Create a New User page, do the following:
Add TDOM1 in the Name field.
Enter and confirm a password.
Click OK.
Click Release Configuration.
Use the following steps to configure your Oracle 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 Oracle Tuxedo installation and create a working Oracle Tuxedo simpapp
directory.
Change directories to your working Oracle 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 EXAMPLES_HOME
\wl_server\examples\src\examples\wtc\atmi\simpapp
directory to your Oracle Tuxedo simpapp
directory.
For more information on the WebLogic Server code examples, see "Sample Applications and Code Examples" in Understanding Oracle WebLogic Server
Copy the tolower.c
file from the EXAMPLES_HOME
\wl_server\examples\src\examples\wtc\atmi\simpserv
directory to your Oracle Tuxedo simpapp
directory.
Modify the ubbdomain
for your Oracle Tuxedo environment. This includes setting the path names 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 Oracle Tuxedo environment. This includes creating log devices and updating the network addresses.
Example:
DMTLOGDEV="d:\my_apps\tlog" AUDITLOG="d:\my_apps\aud" 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 -f tolower.c -o tolower
Boot the Tuxedo domain
tmboot -y
Run each client to demonstrate interoperability between Oracle Tuxedo and Oracle WebLogic Server.
Start an Oracle WebLogic Server client from the directory location to which you downloaded the samples. For example, EXAMPLES_HOME
\wl_server\examples\src\examples\wtc\atmi\simpapp
directory to invoke the TOUPPER EJB
and connect to the Oracle Tuxedo TOUPPER
service. For more information on the WebLogic Server code examples, see "Sample Applications and Code Examples" in Understanding Oracle WebLogic Server. Use the following command:
ant simpapp
The Oracle Tuxedo service replies to your Oracle WebLogic Server application with:
Buildfile: build.xml simpapp: run_client: [java] Beginning statefulSession.Client... [java] Creating Toupper [java] converting HelloWorld [java] converted to: HELLOWORLD [java] End statefulSession.Client... BUILD SUCCESSFUL
Run the tolower
client from the Oracle Tuxedo simpapp
directory to invoke the Tolower EJB and return the results to the client. Use the following command:
tolower ALLSMALL
The Oracle WebLogic Server service replies to your Oracle Tuxedo client with:
Returned string is: allsmall