BEA Logo BEA WebLogic Enterprise Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLE Doc Home   |   Transactions & Related Topics   |   Previous   |   Next   |   Contents   |   Index

Using Transactions

This document explains how to use transactions in CORBA, EJB, and RMI applications that run on WebLogic Enterprise (WLE). It introduces transaction concepts and the WLE Transaction Service. It discusses examples of transactional CORBA applications (C++ and Java), EJB applications (with container- and bean-managed transaction demarcation), and RMI applications. It describes how to integrate transactions with CORBA Java, EJB, and RMI applications that use the WLE JDBC/XA driver. Finally, this document explains how to administer transactional WLE applications.

 

1. Introducing Transactions

Overview of Transactions in WLE Applications

   ACID Properties of Transactions

   Supported Programming Models

   Supported API Models

   Support for Business Transactions

   Distributed Transactions and the Two-Phase Commit Protocol

When to Use Transactions

What Happens During a Transaction

   Transactions in WLE CORBA Applications

   Transactions in WLE EJB Applications

   Transactions in WLE RMI Applications

Transactions Sample Code

   Transactions Sample CORBA Application

   Transactions Sample EJB Code

   Transactions Sample RMI Code

 

2. Transaction Service

About the Transaction Service

Capabilities and Limitations

   Lightweight Clients with Delegated Commit

   Transaction Propagation (CORBA Only)

   Transaction Integrity

   Transaction Termination

   Flat Transactions

   Interoperability Between Remote Clients and the WLE Domain

   Intradomain and Interdomain Interoperability

   Network Interoperability

   Relationship of the Transaction Service to Transaction Processing

   Process Failure

   Multithreaded Transaction Client Support

   General Constraints

Transaction Service in CORBA Applications

   Getting Initial References to the TransactionCurrent Object

   CORBA Transaction Service API

   CORBA Transaction Service API Extensions

   Notes on Using Transactions in WLE CORBA Applications

Transaction Service in EJB Applications

Transaction Service in RMI Applications

UserTransaction API

   UserTransaction Methods

   Exceptions Thrown by UserTransaction Methods

 

3. Transactions in CORBA Server Applications

Integrating Transactions in a WLE Client and Server Application

   Transaction Support in CORBA Applications

   Making an Object Automatically Transactional

   Enabling an Object to Participate in a Transaction

   Preventing an Object from Being Invoked While a Transaction Is Scoped

   Excluding an Object from an Ongoing Transaction

   Assigning Policies

   Using an XA Resource Manager

   Opening an XA Resource Manager

   Closing an XA Resource Manager

Transactions and Object State Management

   Delegating Object State Management to an XA Resource Manager

   Waiting Until Transaction Work Is Complete Before Writing to the Database

User-Defined Exceptions

   About User-Defined Exceptions

   Defining the Exception

   Throwing the Exception

How the Transactions University Sample Application Works (C++ Only)

   About the Transactions University Sample Application

   Transactional Model Used by the Transactions University Sample Application

   Object State Considerations for the University Server Application

   Configuration Requirements for the Transactions Sample Application

 

4. Transactions in CORBA Client Applications

Overview of WLE CORBA Transactions

Summary of the Development Process for Transactions

Step 1: Use the Bootstrap Object to Obtain the TransactionCurrent Object

   C++ Example

   Java Example

   Visual Basic Example

Step 2: Use the TransactionCurrent Methods

   C++ Example

   Java Example

   Visual Basic Example

 

5. Transactions Sample CORBA Java JDBC Application

How the JDBC Bankapp Sample Application Works

   Java Server Objects

   Application Workflow

   JDBC Connection Pooling

Development Process for the JDBC Bankapp Sample Application

   Object Management Group (OMG) Interface Definition Language (IDL)

   Client Application

   Server Application

   Server Description File (BankApp.xml)

   UBBCONFIG File

Setting Up the Database for the JDBC Bankapp Sample Application

   Setting Up an Oracle Database

   Setting Up a Microsoft SQL Server Database

Building the JDBC Bankapp Sample Application

   Step 1: Copy the Files for the JDBC Bankapp Sample Application into a Work Directory

   Step 2: Change the Protection Attribute on the Files for the JDBC Bankapp Sample Application

   Step 3: Verify the Settings of the Environment Variables

   Step 4: Run the setupJ Command

   Step 5: Load the UBBCONFIG File

Compiling the Client and Server Applications

Initializing the Database

   Initializing an Oracle Database

   Initializing a Microsoft SQL Server Database

Starting the Server Application in the JDBC Bankapp Sample Application

Files Generated by the JDBC Bankapp Sample Application

Starting the ATM Client Application in the JDBC Bankapp Sample Application

Stopping the JDBC Bankapp Sample Application

Using the ATM Client Application

   Available Banking Operations

   Available Statistics

   Keypad Functions

   Steps for Using the ATM Client Application

 

6. Transactions Sample CORBA C++ XA Application

How the Transactions Sample Application Works

   Application Steps

   Application Workflow

Development Process for the Transactions Sample Application

   OMG IDL

   Client Application

   University Server Application

   UBBCONFIG File

   Implementation Configuration File (ICF)

Setting Up the Transactions Sample Application

   Step 1: Copy the Files for the Transactions Sample Application into a Work Directory

   Step 2: Change the Protection on the Files for the Transactions Sample Application

   Step 3: Set the Environment Variables

   Step 4: Initialize the University Database

   Step 5: Load the UBBCONFIG File

   Step 6: Create a Transaction Log

Compiling the Transactions Sample Application

   Building the CORBA C++ Server and Client Applications

   Building the CORBA Java Client Application

   Building the ActiveX Client Application

Running the Transactions Sample Application

   Step 1: Start the Server Application

   Step 2: Start a Client Application

Using the Client Applications in the Transactions sample application

   CORBA C++ Client Application

   CORBA Java Client Application

   ActiveX Client Application

 

7. Transactions Sample CORBA Java/C++ XA Application

How the XA Bankapp Sample Application Works

   Server Applications

   Application Workflow

   Software Prerequisites

Development Process for the XA Bankapp Sample Application

   Object Management Group (OMG) Interface Definition Language (IDL)

   Client Application

   Server Application

   Server Description File

   Implementation Configuration File

   UBBCONFIG File

Setting Up the Database for the XA Bankapp Sample Application

Building the XA Bankapp Sample Application

   Step 1: Copy the Files for the XA Bankapp Sample Application into a Work Directory

   Step 2: Change the Protection Attribute on the Files for the XA Bankapp Sample Application

   Step 3: Verify the Settings of the Environment Variables

   Step 4: Run the setupX Command

   Step 5: Load the UBBCONFIG File

   Step 6: Create a Transaction Log

Compiling the Client and Server Applications

Initializing the Oracle Database

Starting the Server Application in the XA Bankapp Sample Application

Files Generated by the XA Bankapp Sample Application

Starting the ATM Client Application in the XA Bankapp Sample Application

Stopping the XA Bankapp Sample Application

Using the ATM Client Application

 

8. Transactions in EJB Applications

Before You Begin

General Guidelines

Transaction Attributes

   About Transaction Attributes for EJBs

   Transaction Attributes for Container-Managed Transactions

   Transaction Attributes for Bean Managed Transactions

Participating in a Transaction

Transaction Semantics

   Transaction Semantics for Container-Managed Transactions

   Transaction Semantics for Bean-Managed Transactions

Session Synchronization

Setting Transaction Timeouts

Handling Exceptions in EJB Transactions

 

9. Transactions in RMI Applications

Before You Begin

General Guidelines

 

10. Transactions and the WLE JDBC/XA Driver

Before You Begin

About Transactions and the WLE JDBX/XA Driver

   Support for Transactions Using the WLE JDBC/XA Driver

   Local Versus Distributed (Global) Transactions

   Transaction Contexts in WLE JDBC/XA Connections

JDBC Accessibility in Java Methods

   JDBC/XA Accessibility in CORBA Methods

   JDBC/XA Accessibility in EJB Methods

Using the JDBC/XA Driver

Implementing Distributed Transactions

   Importing Packages

   Initializing the TransactionCurrent Object Reference

   Finding the Connection Pool via JNDI

   Setting Up XA Distributed Transactions

   Performing a Distributed Transaction

 

11. Administering Transactions

Modifying the UBBCONFIG File to Accommodate Transactions

   Summary of Steps

   Step 1: Specify Application-Wide Transactions in the RESOURCES Section

   Step 2: Create a Transaction Log (TLOG)

   Step 3: Define Each Resource Manager (RM) and the Transaction Manager Server in the GROUPS Section

   Step 4: Enable an Interface to Begin a Transaction

Modifying the Domain Configuration File to Support Transactions (WLE Servers)

   Characteristics of the DMTLOGDEV, DMTLOGNAME, DMTLOGSIZE, MAXRDTRAN, and MAXTRAN Parameters

   Characteristics of the AUTOTRAN and TRANTIME Parameters (WLE CORBA and TUXEDO Servers)

Sample Distributed Application Using Transactions

   RESOURCES Section

   MACHINES Section

   GROUPS and NETWORK Sections

   SERVERS, SERVICES, and ROUTING Sections