Announcement Announcement Module
Collapse
No announcement yet.
NameMatchMethodPointcutAdvisor prevents advisor being called Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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>

    Comment

    Working...
    X