title: how to implement Long running distributed transaction in j2ee
body: <p>I want to move records from one database to another which are on different machines. the records should be removed from first database and inserted to second database atomically.</p>
  
  <p>can we use xa ?
  i believe xa uses 2 phase commit algorithm which requires the blocking locks on the resources</p>
  
  <p>the target database is a EIS database, so it should be locked for minimum time. </p>