• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Struts2 with Spring AOP

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this possible?

I have tried several ways to integrate spring AOP with Struts2, with no luck. AutoProxy doesn't seem work well too. Can you guys suggest some ideas?

Thanks,
-Visu

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to use cglib proxies.
 
vishwa venkat
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.

I got cglib and asm in my classpath and here is the snippet from applicationContext.xml


<!-- A simple MethodInterceptor style advice object (InterceptorA implements MethodInterceptor) -->
<bean id="loggingAspect" class="aspects.LoggingAspect"/>


<bean name="pointcut.advisor2" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
<property name="advice" ref="loggingAspect"/>
<property name="mappedName" value="*"/>
</bean>


<!-- Create the proxy bean that returns AOP'd varieties of our controller -->
<bean name="myController" class="org.springframework.aop.framework.ProxyFactoryBean">

<property name="target" ref="claimService" />
<property name="interceptorNames">
<list>
<value>pointcut.advisor2</value>
</list>
</property>

</bean>

After all this, I don't see any error, but also I don't see any thing happening.Aspect is not being executed.

Do you have a sample? Thanks-
Visu
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic