Interceptor not matche with 4.1.7 migration

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2014 11:51 AM
Hi,
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:
But this interceptor is not call when i had a document, but before migration yes.
Here an extract of the class:
here the declaration:
Does anyone have an idea?
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 module.properties –> <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> <bean id="doNotIndexInterceptor" class="org.alfresco.module.nonindexingamp.DoNotIndexIntercempor"> <property name="nodeService"> <ref bean="nodeService" /> </property> </bean> <bean id="proxiedContentService" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="proxyInterfaces"> <value>org.alfresco.service.cmr.repository.ContentService</value> </property> <property name="target"> <ref bean="contentService"/> </property> <property name="interceptorNames"> <list> <idref local="doNotIndexInterceptor"/> </list> </property> </bean>
Does anyone have an idea?
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2014 01:20 PM
Can't see anything wrong with what you have posted. But I suggest you double check the bean names since the spring configuration may have changed, since 3.0.0. (You may be intercepting the wrong bean now. And I note that you are intercepting "contentService" rather than "ContentService".)
Also please note that index control is now provided by alfresco 4.X so your module may no longer be necessary.
Also please note that index control is now provided by alfresco 4.X so your module may no longer be necessary.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2014 01:20 PM
Can't see anything wrong with what you have posted. But I suggest you double check the bean names since the spring configuration may have changed, since 3.0.0. (You may be intercepting the wrong bean now. And I note that you are intercepting "contentService" rather than "ContentService".)
Also please note that index control is now provided by alfresco 4.X so your module may no longer be necessary.
Also please note that index control is now provided by alfresco 4.X so your module may no longer be necessary.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2014 04:14 AM
THanks a lot, the bean intercept exists but i'm not sure that what the same use for indexing now.
Do you know the bean used for read the content to index it ?
Otherwise, i find this configuration which wil be used to not index the content.
THe documentation link is : <a>http://docs.alfresco.com/4.1/concepts/search-fts-config.html</a>
But when i had this code to the share-config-custom.xml, the content indexed and it's not that i want.
what method is used to not indexe content of a document ?
Do you know the bean used for read the content to index it ?
Otherwise, i find this configuration which wil be used to not index the content.
<type name="cm:content"> <title>Content</title> <parent>cm:cmobject</parent> <properties> <property name="cm:content"> <type>d:content</type> <mandatory>false</mandatory> <index enabled="false"> </index> </property> </properties> </type>
THe documentation link is : <a>http://docs.alfresco.com/4.1/concepts/search-fts-config.html</a>
But when i had this code to the share-config-custom.xml, the content indexed and it's not that i want.
what method is used to not indexe content of a document ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2014 08:13 AM
Hi,
i finally set the property cm:isContentIndexed to false when i had the document by java code:
<java>
contentProps.put(ContentModel.PROP_IS_CONTENT_INDEXED, false);
</java>
and it's work fine.
The interceptor problems came from the fact that contentService wasn't the service call by the indexing .
The interceptor deprecated in my code.
Thanks for all.
titia
i finally set the property cm:isContentIndexed to false when i had the document by java code:
<java>
contentProps.put(ContentModel.PROP_IS_CONTENT_INDEXED, false);
</java>
and it's work fine.
The interceptor problems came from the fact that contentService wasn't the service call by the indexing .
The interceptor deprecated in my code.
Thanks for all.
titia
