I am using hibernate 3.6 with MSSQL 2005, 2008, 2012.
I would like to set the isolation level of the transaction created by the session, but I cannot find information about it.
This is my code.
Session sess = factory.openSession();
Transaction tx = null;
try {
tx = sess.beginTransaction();
// do some work
...
tx.commit();
}
catch (RuntimeException e) {
if (tx != null) tx.rollback();
throw e; // or display error message
}
finally {
sess.close();
}
I would like to do something like this
sess.beginTransaction(1|2|4|8);
Is it possible?
Thanks.
Rotem source
share