Results 1 to 2 of 2

Thread: Spring AOP Doubts

  1. #1
    Join Date
    Nov 2007
    Posts
    17

    Default Spring AOP Doubts

    Hi all, I am new to Spring AOP and I have some doubts which I am hoping someone can shed some light on:

    Code:
    @Transactional(timeout = 5, readOnly=true)
    public void runLongQuery()
    {
     jdbcTemplate.queryForList("Select * from sometable); // Takes long time
    }
    IN debug mode, I see that a new transaction is been created; but the timeout does not take effect; and does not rollback either... Is there any reason why?

    I read that it is because the oracle driver does not support readonly transactions. Is that true?

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    Almost no JDBC driver supports readonly... Also readonly is only a hint in general only useful when using something else as JDBC (like ORM provider hibernate for instance).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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