BEA Logo BEA WebLogic Enterprise Release 5.1

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

 

   WebLogic Enterprise Doc Home   |   Transaction Topics   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Using Transactions

 

This document explains how to use transactions in CORBA, EJB, and RMI applications that run in the WebLogic EnterpriseTM environment. 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 WebLogic Enterprise 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 WebLogic Enterprise CORBA Applications

Transactions in WebLogic Enterprise EJB Applications

Transactions in WebLogic Enterprise 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 WebLogic Enterprise 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 WebLogic Enterprise 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 WebLogic Enterprise 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 WebLogic Enterprise 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 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

 

6. Transactions in RMI Applications

Before You Begin

General Guidelines

 

7. Transactions and the WebLogic Enterprise JDBC/XA Driver

Before You Begin

About Transactions and the WebLogic Enterprise JDBX/XA Driver

Support for Transactions Using the WebLogic Enterprise JDBC/XA Driver

Local Versus Distributed (Global) Transactions

Transaction Contexts in WebLogic Enterprise 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

 

8. 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 (WebLogic Enterprise Servers)

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

Characteristics of the AUTOTRAN and TRANTIME Parameters (WebLogic Enterprise CORBA and Tuxedo Servers)

Sample Distributed Application Using Transactions

RESOURCES Section

MACHINES Section

GROUPS and NETWORK Sections

SERVERS, SERVICES, and ROUTING Sections