I have a quick question about nested transaction in
Hibernate version: 3.1.
I have this following code which works without any issues in
Hibernate 3.0.
Code:
Session session;
Transaction tx; //Global variable
void method1(){
tx = session.beginTransaction();
method2();
//Do something
session.saveOrUpdate(myobj1);
tx.commit(); <------- I'm getting error here
}
void method2(){
tx = session.beginTransaction();
//Do something
session.saveOrUpdate(myobj2);
tx.commit();
}
When I migrated my code to 3.1, I've started getting the below exception.
Code:
Fri Jan 13 18:13:35 EST 2006 ERROR [main] CriticalException - ERROR : Unable to get Connection object from Session; nested exception is:
org.hibernate.TransactionException: Transaction not successfully started
org.hibernate.TransactionException: Transaction not successfully started
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:100)
at com.gs.refs.api.REFSAdminAPIHelper.checkAndBuildKeys(REFSAdminAPIHelper.java:1661)
at com.gs.refs.api.REFSAdminAPI.checkAndBuildKeys(REFSAdminAPI.java:783)
at com.gs.aml.rls.helper.REFSScreeningAdminClient.main(REFSScreeningAdminClient.java:133)
Can someone please help me understand why I'm getting this error?
Name and version of the database used: UDB 8