Announcement Announcement Module
Collapse
No announcement yet.
Migrating from Hades (Transactional issue) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrating from Hades (Transactional issue)

    Hi

    I'm trying the latest version of spring-data-jpa, webflow and all the core spring libs of 3.0.7 release.

    Before the switch to extending JpaRepository the session only flushed at the very end of the flow, now it flushes at various steps, most of which make perfect sense, such as when hibernate generates IDs automatically.
    I changed all such instances to manually assign IDs, and I set the @Transactional annotations to define the transaction boundaries around the service layer.
    Almost everything behaves as expected now except that when the flow kicks off a subflow it also commits, so if the subflow is cancelled or throws an error, it doesn't rollback the entire transaction, only the changes in the subflow.
    It's probably not the kicking off the subflow, rather that we're doing some DAO work in the one flow before kicking off the subflow, new records and updates before recording the payment for example.

    I've switched the flushmode to COMMIT on the entity manager in JpaPropagatedFlowExecutionListener, and that didn't do the trick.
    Any ideas on what else I could be missing?
    More specifically, is there something I should have set up to go from Hades to Spring Data JPA and keep everything working as it did before or is it the transaction annotation processing regardless of whether I was using spring data or not?
    Last edited by Taariq; Nov 13th, 2012, 12:17 AM.

  • #2
    Nevermind, sorted with read only transactions for some of the services.

    Comment

    Working...
    X