Results 1 to 2 of 2

Thread: Transaction management is not working properly

  1. #1
    Join Date
    Jun 2010
    Posts
    9

    Default Transaction management is not working properly

    Hi,

    I am working on a JSF application in which I am using Spring and hibernate for data access. I am using annotations to mark transaction management in my application. Somehow my transaction is not rolling back properly. I am passing User object that has a list of roles and addresses. During update, update of one of the list fail, however, when I check user table it shows an update. Attached are following files;

    WebContext.xml : Configuration about annotations
    UpdateUserService : This is where I am using @Transactional annotation
    ExceptionLog : Information about exception that I seen in server console.

    Thanks a lot in advance for helping me here.

    Sani
    Attached Files Attached Files

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

    Default

    Use the search as this question has been answered numerous times before. I suggest a read of the aop chapter of spring.

    You annotated an internal method with @Transactional which is basically useless. Spring uses proxies, only method calls into the object are intercepted, not external calls.
    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
  •