background image

Transactions in Web Components

<< Updating Multiple Databases | Resource Connections >>
<< Updating Multiple Databases | Resource Connections >>

Transactions in Web Components

Transactions in Web Components
You can demarcate a transaction in a web component by using either the
java.sql.Connection
or javax.transaction.UserTransaction interface. These are the same
interfaces that a session bean with bean-managed transactions can use. Transactions
demarcated with the UserTransaction interface are discussed in the section
"JTA
Transactions" on page 1004
. For an example of a web component using transactions, see
"Accessing Databases" on page 107
.
Java EE
Server
Java EE
Server
Bean-B
Client
Bean-A
X
Y
Databases
FIGURE 33­3
Updating Multiple Databases across Java EE Servers
Transactions in Web Components
Chapter 33 · Transactions
1007