If, however, you
are accessing two different databases, or two different resources—JDBC and JMS,
for example—and you want the operations performed by both resources to be part
of the same transaction, then you have to use the Java Transaction API (JTA) to group all the operations into a single
transaction.