title: Spring transactions
body: <p>I have written a custom REST compensation framework in spring which records a REST call along with compensation call info (using annotations and AOP) which will be executed if there is a exception the down the line.</p>
  
  <p>E.g
  rest call 1 (success) -> rest call 2 (failed) -> rest call 1 compensation.</p>
  
  <p>The application also uses JTA transactions. Can I extend JTA transaction manager to call the compensation framework logic if the JTA transaction is rolled back?</p>