Results 1 to 3 of 3

Thread: Spring Web Flow Hibernate Concurrency

  1. #1

    Default Spring Web Flow Hibernate Concurrency

    Hi,

    I am using Bitronix transaction manager in my project with Hibernate 3.x Annotation on the beans.
    The service layer contains @Transactional annotation.Moreover we're using Version for concurrency.
    However, Hibernate somehow does NOT throw StaleObjectException even if new version record is present in the database table.
    In a nutshell, multiple users can update same record.
    Interesting, in the Test class I am able to re-produce the same condition and get StaleObjectException.
    Any guesses why Spring web flow & Hibernate combination not doing "concurrency" check?
    Appreciate your help!
    R.B

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    Interesting, but I don't really have any idea why it's not working. I take it you're reattaching the detached object to the Hibernate session when calling back into the transactional service layer?

    Erwin

  3. #3

    Default Spring Web Flow Hibernate Concurrency

    Hi Erwin,

    Thank you for the reply.

    Yes, in service layer I am saving the parent object with child objects in it.

    We debugged the logs (Both Hibernate & Spring) and new transaction is started and ended every time.
    The service layer class is having @Transactional annotation and I see it's "org.springframework.transaction.annotation.Transa ctional" class.But I think it is fine as it's an abstraction and SHOULD take care of Hiberate Transaction too.

    Any thoughts?

    Thank you,
    ~Ritesh

Posting Permissions

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