
Originally Posted by
Colin Sampaleanu
Assuming your TransactionProxyFactoryBean or BeanNameAutoProxyCreator instances are set up properly and you are actually doing transactional interception where you think you are, then the Hibernate Session will be bound to the current thread, once, and used for the entire transaction. When the transaction commits, the session will also be closed.
Juergon has posted you do not need to use the TransactionProxyFactoryBean et al. if you leverage the support in Hibernate for Weblogic JTA. I have my session-per-transaction scope set-up using this approach with no Spring Transaction Manager. I just leverage Spring for the DAO and session support. Seems to work pretty good, especially now that I can lazy initialize my VOs, but I am experiencing some transactional problems per my post under the EJB category.
Hibernate property below:
Code:
<property name="hibernate.transaction.manager_lookup_class"> net.sf.hibernate.transaction.WeblogicTransactionManagerLookup
</property>
HTH,
Lou