For the record, Spring's OpenSessionInView filter works just fine for us. As for your commit issues, I don't really know what is failing to work for you. We are using the hibernateTransactionManager, transactionInterceptor, and autoProxyCreator to have spring automatically start and commit transactions around the methods in our service classes. It works like a charm, but there isn't a single line of code that deals with transactions in our codebase (outside the applicationContext.xml) so I can't tell you what is failing in yours.
Here is a spring config that automatically wraps transaction semantics around any method with a name that starts with 'update' in several service classes. <bean id="hibernateTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager"> <ref bean="hibernateTransactionManager"/> </property> <property name="transactionAttributeSource"> <value> com.euroclick.eurolib.service.CustomerService.update*=PROPAGATION_REQUIRED,ISOLATION_REPEATABLE_READ com.euroclick.eurolib.service.CustomerService.create*=PROPAGATION_REQUIRED,ISOLATION_REPEATABLE_READ com.euroclick.eurolib.service.ReportService.update*=PROPAGATION_REQUIRED,ISOLATION_REPEATABLE_READ com.euroclick.eurolib.service.AdvConversionPageService.create*=PROPAGATION_REQUIRED,ISOLATION_REPEATABLE_READ </value> </property> </bean> <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="interceptorNames"> <value>transactionInterceptor</value> </property> <property name="beanNames"> <list> <idref local="customerService"/> <idref local="reportService"/> <idref local="advConversionPageService"/> </list> </property> </bean> --sam On 5/26/06, Mark <[EMAIL PROTECTED]> wrote:
I will, thanks. MARK James Carman wrote: > Why don't you just give Tapernate a try? There are a few folks using it > already and it is working for them just fine. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]