Is it possible that i can choose NOT to use the automatic session management provided by spring and do it myself in my spring application. For example, i've a DAO object testDAO and i've provided hibernate implementation for this as follows.
HibernateTestDAO extends HibernateDaoSupport implements testDAO
In this class, in my implementation, say for methodA, can i do as below:
If it's possible, do i need to manage the transaction as well?Code:public void methodA() throws DataAccessException { SessionFactory s = getHibernateTemplate().getSessionFactory(); Session s1 = s.openSession(); // CREATE QUERY // execute query // close session }
I'm sorry if i'm asking some weird question.
Thoughts?
Thanks!


Reply With Quote
