This content has been marked as final.
Show 1 reply
-
1. Re: rollback problems using HibernateContext for session man
berkgypsy Dec 21, 2004 1:12 PM (in response to berkgypsy)I changed my code to use UserTransactions, before anyone complains about that. I am still seeing unclosed connections.
public static net.sf.hibernate.Session getSession() throws InfrastructureException{ try{ UserTransaction tm = getTransactionManager(); if(tm.getStatus() == Status.STATUS_NO_TRANSACTION) tm.begin(); Session session = HibernateContext.getSession("java:/HibernateFactory"); return session; }catch(Exception e) { throw new InfrastructureException(e); } }