with JDBC, the idea is :
if your business requirement is to have rollback functionality, you setup your JDBC to Transaction type to : LOCAL_TRANSACTION
then in your flow service:
pub.art.transaction:startTransaction,
Execute your select/insert/update
and then
pub.art.transaction:commit or pub.art.transaction:rollbacktransaction
if you don’t need/want to manage commit/rollback, just use a JDBC with Transaction Type NO_TRANSACTION
then just execute your select/insert/update (it will auto commit)
whenever possible I prefer JDBC Adapter over WmDB package.
Currently we do not have the neccessity to use WmDB, all our JDBC Services are using JDBC Adapter.
When Table A and Table B are in the same schema/database, you can use the approach Jonathan has described.
When they are in different databases you will have to use XATransactions instead.
Select does not require explicit transaction handling.
For Insert and Update this depends what should happen with the inset to table B when the Update on tanle A fails?
For the case that the Insert to table B should be reverted you will require explicit transaction handling.