Results 1 to 2 of 2

Thread: NameMatchMethodPointcutAdvisor prevents advisor being called

  1. #1
    Join Date
    May 2006
    Posts
    142

    Default NameMatchMethodPointcutAdvisor prevents advisor being called

    I figured out direct call to Advisor works but if i use the following snippet then it prevents the call to Advisor and it never gets invoked
    Code:
    <!-- Advisor -->
        <bean id = "aroundCallAdvisor" 
        class = "org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
          <property name="advice" ref="theTracingAroundAdvice"/>  
          <property name="mappedName">
             <value>createIpAddress</value>         
          </property>         	
        </bean>
    Here is the complete configuration file
    Code:
    <!-- Advisor -->
        <bean id = "aroundCallAdvisor" 
        class = "org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
          <property name="advice" ref="theTracingAroundAdvice"/>  
          <property name="mappedName">
             <value>createIpAddress</value>         
          </property>         	
        </bean>
        
        <!-- Advice class -->
       <bean id="theTracingAroundAdvice"
          class="com.boeing.nmt.nams.aspects.PrivilegesInterceptor">           
       </bean>
    
      <!--Transaction -->
    <bean
            id="hbmTransactionProxy"
            class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
            <property name="beanNames">
                <list>
                    <value>*Manager</value>
                </list>
            </property>
            <property name="interceptorNames">
                <list>                
                  <idref bean="txInterceptor" />
                  <idref bean="aroundCallAdvisor" />
                </list>
            </property>
        </bean>

  2. #2
    Join Date
    May 2006
    Posts
    142

    Default

    I still dont have any luck . The simple configuration stuff doesnt work. To clarify what i mentioned in earlier post i.e. direct call to advisor works but that would result in having Advice around all the methods of Implementation Class. Hence i am filtering it with "NameMatchMethodPointcutAdvisor" which prevents the call to the Advisor and then i tried "RegexpMethodPointcutAdvisor" even these prevents the call to Advisor.
    Not sure what to do next ???

    Pl note the following snippet works fine but that is not what i want
    Code:
    <!-- Advisor -->
        <bean id = "aroundCallAdvisor" 
        class = "org.springframework.aop.support.NameMatchMethodPointcutAdvisor" >
          <property name="advice" ref="theTracingAroundAdvice"/>  
          <property name="mappedName">
             <value>createIpAddress</value>         
          </property>         	
        </bean>
        
        <!-- Advice class -->
       <bean id="theTracingAroundAdvice"
          class="com.boeing.nmt.nams.aspects.PrivilegesInterceptor">           
       </bean>
    
      <!--Transaction -->
    <bean
            id="hbmTransactionProxy"
            class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
            <property name="beanNames">
                <list>
                    <value>*Manager</value>
                </list>
            </property>
            <property name="interceptorNames">
                <list>                
                  <idref bean="txInterceptor" />
                  <idref bean="theTracingAroundAdvice" />
                </list>
            </property>
        </bean>

Posting Permissions

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