Global —A complex, broadly scoped transaction involving many statements
and many databases or potentially other transaction capable resources such
as JMS (Java Messaging Service) queues or JCA ( J2EE Connector Architec-
Custom —i BATIS supports user-provided connections for which you can man-
age the transactions however you like.
We've dedicated a section of this chapter to each of these scopes. Before we dis-
cuss them in more detail, let's first talk about the properties of transactions.
Understanding transaction properties
Certain properties, or features, are required for a system to be able to honestly
claim it is capable of performing transaction processing. Nearly all modern rela-
tional databases support transactions, and any that don't should not be consid-
ered for enterprise solutions. The properties are known as the ACID (atomicity,
consistency, isolation, and durability) properties.
The feature that guarantees that all steps in a transaction either succeed or fail as
a group is called atomicity . Without this, it's possible that the database could be left
in an inaccurate state because one step of the transaction failed. This can be illus-
trated very simply by thinking of mathematical addition. Let's add up some num-
bers and consider each addition as a step in the transaction (table 7.5).
Search WWH ::