Back Forum Reply New

Q. about a Hibernate article and TransactionProxyFactoryBean

I cookbook quite a bit from Hibernate's quot;Data Access with the Spring Frameworkquot; article ( 110.html )

Tonight I was working on adding transaction management to a service class and was about to use TransactionProxyFactoryBean when I re-read a line from that article:

A convenient alternative way of setting up declarative transactions is TransactionProxyFactoryBean, particularly if there are no other AOP interceptors involved.

Does the last part mean that I should not use this method if we plan to add other pointcuts to that service?  I can back off to the previous method described, which just adds one more bean, but I haven't found anything in your docs or code that would explain why they made that statement.

Thanks,
-Jeff

A convenient alternative way of setting up declarative transactions is TransactionProxyFactoryBean, particularly if there are no other AOP interceptors

You can add other interceptors easily enough with postInterceptors and preInterceptors propertiesCode:   lt;bean id=quot;txTemplatequot; abstract=quot;truequot; class=quot;org..transaction.interceptor.TransactionProxyFactoryBeanquot;gt;
lt;property name=quot;transactionManagerquot;gt;lt;ref local=quot;transactionManagerquot;/gt;lt;/propertygt;
lt;property name=quot;proxyTargetClassquot;gt;lt;valuegt;truelt;/valuegt;lt;/propertygt;
lt;property name=quot;transactionAttributesquot;gt;
lt;propsgt;
lt;prop key=quot;save*quot;gtROPAGATION_REQUIREDlt;/propgt;
lt;prop key=quot;delete*quot;gtROPAGATION_REQUIREDlt;/propgt;
lt;prop key=quot;find*quot;gtROPAGATION_REQUIRED,readOnlylt;/propgt;
lt;prop key=quot;login*quot;gtROPAGATION_REQUIRED,readOnlylt;/propgt;
lt;/propsgt;
lt;/propertygt;
lt;property name=quot;preInterceptorsquot;gt;
lt;listgt;
lt;ref local=quot;securityInterceptorquot;/gt;
lt;/listgt;
lt;/propertygt;
lt;property name=quot;postInterceptorsquot;gt;
lt;listgt;
lt;ref local=quot;logInterceptorquot;/gt;
lt;/listgt;
lt;/propertygt;
lt;/beangt;
Does the last part mean that I should not use this method if we plan to add other pointcuts to that service?

Do you mean other pointcuts or other interceptors?
¥
Back Forum Reply New