A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Frameworks
»
Spring
Author
Spring Transaction by AOP
Jayaraj Jaganathan
Ranch Hand
Joined: Jun 29, 2009
Posts: 69
posted
Nov 19, 2009 07:17:05
0
<aop:config> <aop:pointcut id="serviceOperation" expression="execution(* x.y.service..*Service.*(..))"/> <aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice"/> </aop:config>
if the above config need to work do i need aspectj ?
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17233
1
I like...
posted
Nov 21, 2009 19:06:55
0
No, just Core Spring and Spring AOP.
Mark
Perfect World Programming, LLC
-
Two Laptop Bag
-
Tube Organizer
How to Ask Questions the Smart Way FAQ
Jayaraj Jaganathan
Ranch Hand
Joined: Jun 29, 2009
Posts: 69
posted
Nov 24, 2009 03:18:27
0
Mark Spritzler wrote:
No, just Core Spring and Spring AOP.
Mark
you are wrong , i need AspectJ runtime.
here is the code with spring AOP
<bean id="common" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="beanNames"> <value>*DAO*</value> </property> <property name="interceptorNames"> <list> <value>transactionInterceptor</value> </list> </property> </bean> <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager" ref="txManager" /> <property name="transactionAttributeSource"> <value> spring.jdbc.dao.ManagementDAO.insert*=PROPAGATION_REQUIRED spring.jdbc.dao.ManagementDAO.select*=PROPAGATION_REQUIRED,readOnly </value> </property> </bean>
I agree. Here's the link:
http://aspose.com/file-tools
subject: Spring Transaction by AOP
Similar Threads
Hello world spring aop
getting $Proxy0 cannot be cast exception
Spring + JPA + Hibernate and multiple Database connection
Transaction demarcation works with TransactionProxy but not AOP
Spring Transaction
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter