A question regarding Container Managed Connections:
Hibernate docs (chapter 11.5) state that hibernate.connection.release_mode should not be set to after_transaction when using JTA. Indeed looking through the source, when using the CMTTransactionFactory the release_mode defaults to after_statement.
My question is, how can a transaction continue over several connections (as will happen with an aggressive release strategy) when not using an XA datasource? Surely the closing of the connection will commit the transaction and mean that it will not be possible to roll the transaction back as a whole.
As such, I would prefer to use after_transaction for my release mode, however the documentation states that this should not be used. Any ideas as to why this would be?
Thanks
|