Results 1 to 2 of 2

Thread: Impact of propagating tx for read-only ops

  1. #1
    Join Date
    Jan 2006
    Location
    Seattle, Washington
    Posts
    467

    Default 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. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    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.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •