As soon as the transaction is launched, until you pass the boundary of the stream, all work will remain in this transaction.
This means that if your transaction manager supports multi-resource transactions and you avoid introducing concurrency into transactions, you will be fine.
In other words: it depends, but it is possible.
iwein source share