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

  • autoproxy with CGLIB error

    Hi,

    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">
    <value>true</value>
    </property>
    </bean>

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

    <bean id="performanceAdvisor" class="org.springframework.aop.support.RegexpMetho dPointcutAdvisor">

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

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

    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?
Working...
X