Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 11 Transactions : JDBC

JDBC
The JDBC transaction allows multiple JDBC activities that access the same database connection to participate in a transaction. Only JDBC activities that use the same JDBC Connection participate in this transaction type, but other activities can be part of the transaction group. If the transaction commits, all JDBC activities using the same JDBC connection in the transaction group commit. If the transaction rolls back, all JDBC activities using the same JDBC connection in the transaction group roll back.
The transaction group commits automatically if all activities in the group complete and a non-error transition is taken out of the transaction group. If any errors occur while processing the activities in the group, even errors in non-JDBC activities, the transaction is rolled back and an error is returned (you should have an error transition out of the group to handle this situation).
Individual JDBC activities can override the default transaction behavior and commit separately. See the description of the JDBC palette in TIBCO ActiveMatrix BusinessWorks Palette Reference for more information about using JDBC activities.
Multiple JDBC Connections In Transaction Groups
All activities that use the same JDBC Connection shared configuration resource are part of the same transaction. It is possible to use more than one JDBC Connection in the same transaction group. However, only activities that use the same JDBC Connection are guaranteed to commit or rollback together when the transaction completes.
If you have more than one JDBC Connection in the transaction group, each set of activities that uses a JDBC Connection is considered a separate transaction. For example, you have three JDBC Updates in a transaction group, A, B, and C. A and B use JDBC Connection X, but C uses JDBC Connection Y. In this case, the updates for activities A and B are part of one transaction and the update for activity C is part of a different transaction.
To create a distributed transaction across multiple databases, use the XA transaction type.
Configuring JDBC Transactions
To configure a JDBC transaction, select JDBC Transaction as the transaction type of the group. Also, in the JDBC Connection resource(s) used by JDBC and Checkpoint activities in the group, select JDBC in the Connection Type field.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved