This content has been marked as final. Show 2 replies
If an EJB is using bean managed transactions, and there is no UserTranscation in effect, is there any difference in overhead for DB reads between using a no-tx-datasource vs local-tx-datasource?
There would not be any difference if there is no ongoing transaction.
If there is an on going transaction then some time will be taken in resource enlistment in TransactionManager , the associated TM implementation would optimize the 2PC(two phase protocol) to just a commit call when the TM realizes that there in only one participant in TX .
Again the 2PC optimizations is not mandated by JCA specs , the TM should do it .
Thank you! That's very helpful.