Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: My Interceptor does not intercept!

  1. #11
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Regis,

    Pointcuts and their uses are covered in detail in chapter 5 of the Spring reference manual. The information in there should help you to get up and running with this.

    Rob

  2. #12
    Join Date
    Jan 2005
    Location
    Fortaleza, Brazil
    Posts
    11

    Default

    Hello Rob,

    Ok. I'll check the reference.

    I should have done it before. Sorry.

    Thanks for help.
    Regis Santos

  3. #13

    Question Interceptor is not getting invoked....

    Hi

    My webContext.xml looks like :

    <!-- ========================= BUSINESS DELEGATE DEFINITIONS ========================= -->

    <bean id="riDelegate"
    class="com.standardchartered.cr.ri.delegate.impl.R IDelegateLocalImpl">
    <property name="service" ref="riService" />
    </bean>

    <bean id="infDelegate"
    class="com.standardchartered.cr.inf.delegate.impl. InfDelegateLocalImpl">
    <property name="service" ref="infService" />
    </bean>

    <!-- ========================= STRUTS ACTION DEFINITIONS ========================= -->

    <bean id="personAction" scope="prototype"
    class="com.standardchartered.cr.ri.action.PersonAc tion">
    <constructor-arg ref="riDelegate" />
    <constructor-arg ref="infDelegate" />
    </bean>



    <!-- ========================= FOR CACHING ========================= -->

    <bean id="appCacheManager" class="net.sf.ehcache.CacheManager">
    <!-- constructor-arg index="0" type="java.net.URL"
    value="classpath:/WEB-INF/ehcache.xml" /-->
    </bean>


    <aop:config>
    <aopointcut id="getPersonByCriteriaPointcut"
    expression="execution(* *..RIDelegateLocalImpl.getPersonByCriteria())" />
    <aop:advisor id="methodCachingAdvisor"
    advice-ref="methodCachingAdvice"
    pointcut-ref="getPersonByCriteriaPointcut" />
    </aop:config>


    <bean id="methodCachingAdvice"
    class="com.standardchartered.cr.ri.caching.interce ptor.MethodCachingInterceptor">
    <property name="cacheManager" ref="appCacheManager" />
    </bean>


    <!-- =========================CACHING ENDS ========================= -->

    the ehcache.xml is:

    <ehcache>
    <diskStore path="java.io.tmpdir" />
    <defaultCache maxElementsInMemory="10" eternal="false"
    timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" />

    <cache name="getPersonByCriteria" maxElementsInMemory="150" eternal="false"
    overflowToDisk="true" timeToIdleSeconds="0" timeToLiveSeconds="86400" />

    </ehcache>


    But my MethodCachingInterceptor class is not getting called.

    What could be the problem ? This is pretty urgent, if u can help...

    Thanks in advance.....

  4. #14
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,425

    Default

    I would take a look at the examples in the Spring reference manual, most of the time the issues related to interceptors are either internal method calls, the AOP expression not being correct or you are proxying interfaces and the AOP expression references the class instead.
    http://www.springframework.org/docs/...l#aop-proxying
    Last edited by karldmoore; Aug 29th, 2007 at 10:02 AM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Similar Threads

  1. Intercept SqlMapClientTemplate calls
    By saden1 in forum Data
    Replies: 1
    Last Post: Oct 3rd, 2005, 03:44 AM
  2. intercept a loaded applicationContext
    By mlaporta in forum AOP
    Replies: 2
    Last Post: Jul 12th, 2005, 08:38 AM
  3. introduce and intercept
    By analogueboy in forum AOP
    Replies: 2
    Last Post: Jun 27th, 2005, 04:33 AM
  4. Intercept Struts actions
    By spalma in forum AOP
    Replies: 0
    Last Post: May 28th, 2005, 11:37 AM
  5. Can I intercept Abstract classes?
    By tom_bangalore in forum AOP
    Replies: 3
    Last Post: Mar 28th, 2005, 01:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •