Announcement Announcement Module
No announcement yet.
autoproxy with CGLIB error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • autoproxy with CGLIB error


    I tried to intercept all the method calls in the sample application(Spring Countries) using the 'DefaultAdvisorAutoProxyCreator'.

    Here's the countries-servlet.xml additions -

    <bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy .DefaultAdvisorAutoProxyCreator">
    <!-- CGLIB for classes-->
    <property name="proxyTargetClass">

    <bean id="perfMonInterceptor" class="org.springframework.aop.interceptor.Perform anceMonitorInterceptor"/>

    <bean id="performanceAdvisor" class=" dPointcutAdvisor">

    <property name="advice">
    <ref local="perfMonInterceptor"/>

    <property name="patterns">
    <value>org\.springframework\.samples\.countries\.. *</value>

    At runtime, CGLIB proxy code refers to the default methodResolver coded in the file (MultiActionController) rather than the PropertiesMethodNameResolver setup in the SPRING-countries application. So, method handleHome is never called and fails with exception - method 'home' not found.

    I'm using Spring 1.1.5 with JDK1.4.2. Ofcourse I'm new to Spring and drawn to it b'cos of AOP and testing capabilities. Using only the libraries shipped with Spring 1.1.5

    Is this a bug or a configuration issue?