Back Forum Reply New

using HibernateDaoSupport and JdbcDaoSupport in the same transaction

mons.dbcp.BasicDataSourcequot;gt;
.....
lt;/beangt;

lt;bean id=quot;sessionFactoryquot; class=quot;org..orm.hibernate3.annotation.AnnotationSessionFactoryBeanquot;gt;
lt;property name=quot;dataSourcequot;gt;
lt;ref bean=quot;dataSourcequot; /gt;
lt;/propertygt;
......
lt;/beangt;

lt;bean id=quot;transactionManagerquot; class=quot;org..orm.hibernate3.HibernateTransactionManagerquot;gt;
lt;property name=quot;sessionFactoryquot; ref=quot;sessionFactoryquot; /gt;
lt;/beangt;

lt;bean id=quot;transactionInterceptorquot; class=quot;org..transaction.interceptor.TransactionInterceptorquot;gt;
lt;property name=quot;transactionAttributeSourcequot;gt;
lt;bean class=quot;org..transaction.annotation.AnnotationTransactionAttributeSourcequot; /gt;
lt;/propertygt;
lt;property name=quot;transactionManagerquot; ref=quot;transactionManagerquot; /gt;
lt;/beangt;

lt;bean class=quot;org..transaction.interceptor.TransactionAttributeSourceAdvisorquot;gt;
lt;property name=quot;transactionInterceptorquot; ref=quot;transactionInterceptorquot; /gt;
lt;/beangt;When posting code use [ code][/code ] tags that way it remains readable.

Yes it works, however before the JDBC stuff can see something put in there with hibernate you will need to flush the session.

Thanks Marten.

Lucas
¥
Back Forum Reply New