Hibernate: openSession vs getCurrentSession
- From: "xyzzy12@xxxxxxxxxxx" <xyzzy12@xxxxxxxxxxx>
- Date: 26 Oct 2006 11:01:12 -0700
What is the recommended approach of openSession vs getCurrentSession?
In Hibernate, there is factory.openSession() and
factory.getCurrentSession(). To make getCurrentSession() to work, we
could set hibernate.current_session_context_class to 'thread' and
hibernate.transaction.factory_class to
org.hibernate.transaction.JDBCTransactionFactory.
Will that cut it in a "production" environment?
If we do the above approach then it appears that we'd never call
openSession nor session.close().
.
- Prev by Date: Re: Geting data from joined tables
- Next by Date: Driver does not support this function
- Previous by thread: Hibernate get vs load
- Next by thread: Driver does not support this function
- Index(es):