0

I have a requirement where i need to write to multiple DB. If any exception occurs while writing to anyone of the DBs, i want to rollback everything.

E.G.

Session userSession= a.getUserDBSession();
Session departmentSession= a.getDepartmentSession();
Session carSession= a.getCarSession();

//Do some work and write to User DB
// Do some work and write to Department DB
//Do some work and write to Car DB
// commit everything.

Note: Session is Hibernate Session Any help would be highly appreciated

Punky
  • 97
  • 1
  • 12

1 Answers1

0

You can try using the Atomikos with hibernate.

Check the below link.

http://www.atomikos.com/Documentation/HibernateThreeStandalone

muthu
  • 16
  • 2