Results 1 to 2 of 2

Thread: Transaction NOT Rollback for RuntimeException

  1. #1
    Join Date
    Oct 2011
    Posts
    15

    Default Transaction NOT Rollback for RuntimeException

    Hi
    We use Spring' JpaTransactionManager with hiberate persistence.xml using LocalContainerEntityManagerFactoryBean. I tried to rollback a transaction by explicitly throwing a Runtime excpetion. But all the data in 3 different JPA Entities is committed.

    How to rollback a transaction using Spring+JPA+Hibernate?

    Thanks in adv

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

    Default

    Please use the search as this question has been answered numerous times before...

    If your transactions aren't rolling back either your setup is wrong our you use a database that doesn't support transactions (MySQL with MyISAM tables 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
  •