background image

Updating Multiple Databases

<< Transaction Timeouts | Transactions in Web Components >>
<< Transaction Timeouts | Transactions in Web Components >>

Updating Multiple Databases

In
Figure 33­3
, the client calls a business method in Bean-A, which begins a transaction and
updates Database X. Then Bean-A invokes a method in Bean-B, which resides in a remote Java
EE server. The method in Bean-B updates Database Y. The transaction managers of the Java EE
servers ensure that both databases are updated in the same transaction.
Java EE
Server
Bean-B
Client
Bean-A
X
Y
Z
Databases
FIGURE 33­2
Updating Multiple Databases
Updating Multiple Databases
The Java EE 5 Tutorial · September 2007
1006