Announcement Announcement Module
Collapse
No announcement yet.
problem with spring transactions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with spring transactions

    I am using springtransactions with hibernate(hibernatetemplate).

    i configured "org.springframework.transaction.interceptor.Trans actionProxyFactoryBean" in spring specific xml file.

    In my update method i am inserting some data into one table and i am getting the primary key which is a sequence exists in oracle DB.after that i am taking that primary key and i am trying to insert into second table i am getting some exception .

    in applicationContext.xml file

    <prop key="update*">PROPAGATION_REQUIRED,-test.BaseException</prop>


    if i get any exception i am raising BaseException.

    but it is inserting into first table.i want to rollback all the operations when i get any exception.

    plz give me some solutiong .....................

  • #2
    If the insert and update are present on the same method (your update method) the transaction should work.

    The second question relative to the exception on insert a field on a second table.
    Perhaps this particular field is declared unique?

    Comment

    Working...
    X