reffering to code below
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
as in above code. the transaction in associated with one session, but my requirement is to attach one transaction with two sessions.
or is the case is that, using one session object i have access to both database servers??
like..
session.save(FirstPojo); // One DB server
session.save(secondPojo);// Other DB server
session.getTransaction().commit();
-----------------
in above case, is the commit is fired to both DB servers on successfull completion in both DB servers?
|