Results 1 to 4 of 4

Thread: Exclude Logging From Rollback

  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Default Exclude Logging From Rollback

    I am using AOP for my logging and rollback. How do I exclude my logging in the database from the roll back. My web application rolls back when an exception occurs. I need also to do Logging in the database but my logging gets rolled back too every exception.

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

    Default

    In general it isn't wise to write (Audit)Logging in the same transaction as the data it applies to, exactly for this reason.
    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

  3. #3
    Join Date
    Mar 2010
    Posts
    2

    Default

    How do I create separate transaction for my logging? Do I create another data source, DAO, sqlmap config, transaction manager, etc . ?

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Just start another transaction, there are various articles describing logging and seperate transactions. So you might want to use google and do a search
    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

Tags for this Thread

Posting Permissions

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