Hi Guys,
I have the following Warning any time I try to update an Object through Hibernate 2.1.1.
[ WARN] net.sf.hibernate.impl.SessionImpl - afterTransactionCompletion() was never called
The code I execute is like this :
Session sess = null;
Transaction tx = null;
Object result = null;
try {
sess = this.openSession();
tx = sess.beginTransaction();
sess.saveOrUpdate(object);
tx.commit();
} catch (Exception e) {
/*log*/ if(log.isFatalEnabled())
log.fatal("Exception", e);
if (tx != null) {
try {
tx.rollback();
} catch (Exception ex) {
}
}
} finally {
if (sess != null) {
try {
sess.close();
} catch (Exception ex) {
}
Do you have any idea what's going wrong??
Thank you
Moh.
|