AnsweredAssumed Answered

Interceptor not matche with 4.1.7 migration

Question asked by titiabackup on Dec 18, 2014
Latest reply on Dec 19, 2014 by titiabackup

I have a problems that i don't understand.
I have an interceptor from the 3.0.0 version which have ok but since the 4.1.7 migrationit's not call and i don't understand why.

THe interceptor is in a module which is correctly include in alfresco, because the log describe a call to the default constructor method and this trace to the log:
preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@152544e, 
name=log4j:logger= ….

But this interceptor is not call when i had a document, but before migration yes.

Here an extract of the class:

public Object invoke(MethodInvocation mi) throws Throwable {
                if (logger.isDebugEnabled() == true) {
         logger.debug("Begin call invoke interceptor");
      NodeRef nodeRef;
      QName propertyQName;
      String contentUrl;
      ContentData contentData = null;
      // check if "getReader" is called
      if (mi.getMethod().getName().equals("getReader")) {

here the declaration:

<!– A simple class that is initialized by Spring –>
    <bean id="nonIndexingRunning" class="org.alfresco.module.nonindexingamp.NonIndexing" init-method="init" />

    <!– A simple module component that will be executed once –>
    <bean id="nonIndxingModule" class="org.alfresco.module.nonindexingamp.NonIndexingComponent" parent="module.baseComponent" >
        <property name="moduleId" value="notIndexing" />  <!– See –>
        <property name="name" value="NonIndexingComponent" />
        <property name="description" value="Do not index content if aspect is added" />
        <property name="sinceVersion" value="1.0" />
        <property name="appliesFromVersion" value="1.0" />

   <bean id="doNotIndexInterceptor" class="org.alfresco.module.nonindexingamp.DoNotIndexIntercempor">
            <property name="nodeService">
            <ref bean="nodeService" />

    <bean id="proxiedContentService" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces">
        <property name="target">
            <ref bean="contentService"/>
        <property name="interceptorNames">
                <idref local="doNotIndexInterceptor"/>

Does anyone have an idea?