Announcement Announcement Module
Collapse
No announcement yet.
Impact of propagating tx for read-only ops Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Impact of propagating tx for read-only ops

    If I have a bean with a DAO bean using TransactionProxyFactoryBean, where the operation is just a read-only query, what is the performance impact of having a "transactionAttributes" setting like this:

    PROPAGATION_SUPPORTS,readOnly

    I have a couple read-only operations like this which are performed both before and after other operations that write rows to the database.

    Is there any value in doing something different with the transaction attributes for a read-only operation?

  • #2
    Serious databases should not incur any penalty on the performance. It is recommended that read operations are wrapped inside a transaction since any side-effect writing that might occur (on purpose or not) can be caught. Note however, that the readonly is just a hint to the jdbc driver.

    Comment

    Working...
    X