Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2010
    Posts
    25
    Rep Power
    0

    Thumbs down Rollback the transcation

    hi,

    i am inserting table values one is related to each other.Now first table values are inserted and while saving in second table error occured.Now the first table values are store.But i want to rollback the first table values also.how can i do that?

    Please help me in this.
    Thanks&Regards,
    Muralikrishna K

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default

    What technology do you use for relate to database?
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    Join Date
    Jun 2010
    Posts
    25
    Rep Power
    0

    Thumbs down Rollback in spring

    i am using spring,hibernate,jsf.In application context we can make that method propogation required attributes.Here two bean classes are using for saving values.
    Thanks&Regards,
    Muralikrishna K

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    So make both inserts part of the same transaction.

  5. #5
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default

    Yes I agree with r035198x.
    if you use Hibernate and Spring you made DAO layer, which allows transactions operations.
    see
    Chapter*9.*Transaction management
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. Dynamic Proxies-Transaction-Commit-Rollback
    By rsiddharth in forum New To Java
    Replies: 2
    Last Post: 02-23-2010, 02:59 PM

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
  •