Announcement Announcement Module
Collapse
No announcement yet.
Combined pointcut expression does not work? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Combined pointcut expression does not work?

    Hi,

    I have the following spring configuration
    Code:
        <aop:config>
            <aop:advisor advice-ref="myInterceptor"
                         pointcut="execution(* javax.sql.DataSource.getConnection(..)) and !bean(jmsDataSource)"/>
    What I want to do is to intercept all getConnection method from any class inheriting javax.sql.DataSource except those data source that has bean name "jmsDataSource".

    What happen is that it still intercept all getConnection including from the bean that has name jmsDataSource.

    Is there anything wrong with my configuration? Any help is very much appreciated.

    Cheers,
    Wins

  • #2
    Try combining it in the following way :-

    execution(* com.tdc.ssp.web.postpaidprivate.delegate.*.*(..)) and !execution(* getSubscriberProductAndBillDetails(..))

    Hope this helps.

    Comment


    • #3
      Thanks Hetal B,

      I did not tried to combine execute and !execute. It may be working. But my configuration to combine execute and !bean is definitely not working (at least in my machine). However when I tried to combine execute and bean, this is working perfectly.

      So I don't know whether !bean is not supported or there is another thing that I'm missing.

      Cheers,
      Wins

      Comment


      • #4
        Which version of Spring are you using? It was a bug in the previous versions, try using version 2.5.6. !bean is working with this version of Spring.

        Hope this resolves the problem.

        Comment


        • #5
          Hi,

          Thank you for your response.
          The version that didn't work for me was 2.5.6

          Cheers,
          Wins

          Comment

          Working...
          X