Hi,
I am a bit confused. As HibernateTemplate should not be used... Can I still set Transaction bounderies programmatically with spring using doInTransaction()?
I only found examples and hints using declarative Transaction with @Transactional Annotation. Is the programmatic way still possible? Is there any exampe that Show how it can be done.
Actutally I use:
Code:
<prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate3.SpringSessionContext</prop>
and in several DAOs that should join the transaction
Code:
Session session = this.sessionFactory.getCurrentSession();
session.persist(p);
No trans begin, no commit, no session close. Tests worked fine regarding commit and rollback. But will the session be closed by Spring, too?
Thanks for any hints...
Frank