mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AVM and context issues
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<ref bean="NodeService" />
|
<ref bean="NodeService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="SearchService" />
|
<ref bean="ADMSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="authenticationComponent">
|
<property name="authenticationComponent">
|
||||||
<ref bean="authenticationComponent" />
|
<ref bean="authenticationComponent" />
|
||||||
@@ -414,7 +414,7 @@
|
|||||||
|
|
||||||
<bean id="simple-avm-submit" class="org.alfresco.repo.avm.actions.SimpleAVMSubmitAction" parent="action-executer">
|
<bean id="simple-avm-submit" class="org.alfresco.repo.avm.actions.SimpleAVMSubmitAction" parent="action-executer">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="avmSyncService">
|
<property name="avmSyncService">
|
||||||
<ref bean="avmSyncService"/>
|
<ref bean="avmSyncService"/>
|
||||||
@@ -468,7 +468,7 @@
|
|||||||
|
|
||||||
<bean id="avm-revert-to-version" class="org.alfresco.repo.avm.actions.AVMRevertToVersionAction" parent = "action-executer">
|
<bean id="avm-revert-to-version" class="org.alfresco.repo.avm.actions.AVMRevertToVersionAction" parent = "action-executer">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="publicAction">
|
<property name="publicAction">
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
|
|
||||||
<bean id="avm-undo-list" class="org.alfresco.repo.avm.actions.AVMUndoSandboxListAction" parent="action-executer">
|
<bean id="avm-undo-list" class="org.alfresco.repo.avm.actions.AVMUndoSandboxListAction" parent="action-executer">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="publicAction">
|
<property name="publicAction">
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
<ref bean="namespaceService" />
|
<ref bean="namespaceService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="searchService" />
|
<ref bean="admSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="userNamesAreCaseSensitive">
|
<property name="userNamesAreCaseSensitive">
|
||||||
<value>${user.name.caseSensitive}</value>
|
<value>${user.name.caseSensitive}</value>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<ref bean="nodeService" />
|
<ref bean="nodeService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="searchService" />
|
<ref bean="admSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="permissionServiceSPI">
|
<property name="permissionServiceSPI">
|
||||||
<ref bean="permissionServiceImpl" />
|
<ref bean="permissionServiceImpl" />
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
<ref bean="namespaceService" />
|
<ref bean="namespaceService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="searchService" />
|
<ref bean="admSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="dictionaryService">
|
<property name="dictionaryService">
|
||||||
<ref bean="dictionaryService" />
|
<ref bean="dictionaryService" />
|
||||||
|
@@ -17,13 +17,13 @@
|
|||||||
|
|
||||||
<bean id="bulkLoader" class="org.alfresco.repo.avm.util.BulkLoader">
|
<bean id="bulkLoader" class="org.alfresco.repo.avm.util.BulkLoader">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="interactiveConsole" class="org.alfresco.repo.avm.AVMInterpreter">
|
<bean id="interactiveConsole" class="org.alfresco.repo.avm.AVMInterpreter">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="bulkLoader">
|
<property name="bulkLoader">
|
||||||
<ref bean="bulkLoader"/>
|
<ref bean="bulkLoader"/>
|
||||||
|
@@ -270,6 +270,12 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="admSearchService" class="org.alfresco.repo.search.SearcherComponent">
|
||||||
|
<property name="indexerAndSearcherFactory">
|
||||||
|
<ref bean="admLuceneIndexerAndSearcherFactory" />
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Generic factory for making indexers and searchers for a given protol or store -->
|
<!-- Generic factory for making indexers and searchers for a given protol or store -->
|
||||||
@@ -471,7 +477,7 @@
|
|||||||
<ref bean="ownableService"></ref>
|
<ref bean="ownableService"></ref>
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="searchService"></ref>
|
<ref bean="admSearchService"></ref>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
@@ -491,7 +497,7 @@
|
|||||||
<ref bean="versionCounterService" />
|
<ref bean="versionCounterService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searcher">
|
<property name="searcher">
|
||||||
<ref bean="searchService" />
|
<ref bean="admSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="dictionaryService">
|
<property name="dictionaryService">
|
||||||
<ref bean="dictionaryService" />
|
<ref bean="dictionaryService" />
|
||||||
@@ -675,7 +681,7 @@
|
|||||||
<ref bean="ruleService" />
|
<ref bean="ruleService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="SearchService" />
|
<ref bean="ADMSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="permissionService">
|
<property name="permissionService">
|
||||||
<ref bean="PermissionService" />
|
<ref bean="PermissionService" />
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<property name="dictionaryService"><ref bean="dictionaryService" /></property>
|
<property name="dictionaryService"><ref bean="dictionaryService" /></property>
|
||||||
<property name="nodeService"><ref bean="nodeService" /></property>
|
<property name="nodeService"><ref bean="nodeService" /></property>
|
||||||
<property name="copyService"><ref bean="copyService" /></property>
|
<property name="copyService"><ref bean="copyService" /></property>
|
||||||
<property name="searchService"><ref bean="searchService" /></property>
|
<property name="searchService"><ref bean="admSearchService" /></property>
|
||||||
<property name="contentService"><ref bean="contentService" /></property>
|
<property name="contentService"><ref bean="contentService" /></property>
|
||||||
<property name="multilingualContentService"><ref bean="multilingualContentService" /></property>
|
<property name="multilingualContentService"><ref bean="multilingualContentService" /></property>
|
||||||
<property name="mimetypeService"><ref bean="mimetypeService" /></property>
|
<property name="mimetypeService"><ref bean="mimetypeService" /></property>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<ref bean="nodeService" />
|
<ref bean="nodeService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="searchService">
|
<property name="searchService">
|
||||||
<ref bean="searchService" />
|
<ref bean="admSearchService" />
|
||||||
</property>
|
</property>
|
||||||
<property name="versionService">
|
<property name="versionService">
|
||||||
<ref bean="versionService" />
|
<ref bean="versionService" />
|
||||||
|
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<!-- AVM Filesystem Interface -->
|
<!-- AVM Filesystem Interface -->
|
||||||
<bean id="avmDiskDriver" class="org.alfresco.filesys.avm.AVMDiskDriver" >
|
<bean id="avmDiskDriver" class="org.alfresco.filesys.avm.AVMDiskDriver" >
|
||||||
<property name="avmService"><ref bean="avmService" /></property>
|
<property name="avmService"><ref bean="indexingAVMService" /></property>
|
||||||
<property name="transactionService"><ref bean="transactionComponent" /></property>
|
<property name="transactionService"><ref bean="transactionComponent" /></property>
|
||||||
<property name="authenticationComponent"><ref bean="authenticationComponent"/></property>
|
<property name="authenticationComponent"><ref bean="authenticationComponent"/></property>
|
||||||
<property name="authenticationService"><ref bean="authenticationService"/></property>
|
<property name="authenticationService"><ref bean="authenticationService"/></property>
|
||||||
|
@@ -148,6 +148,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="ADMSearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
|
<property name="proxyInterfaces">
|
||||||
|
<value>org.alfresco.service.cmr.search.SearchService</value>
|
||||||
|
</property>
|
||||||
|
<property name="target">
|
||||||
|
<ref bean="admSearchService"/>
|
||||||
|
</property>
|
||||||
|
<property name="interceptorNames">
|
||||||
|
<list>
|
||||||
|
<idref local="SearchService_transaction"/>
|
||||||
|
<idref local="AuditMethodInterceptor"/>
|
||||||
|
<idref local="exceptionTranslator"/>
|
||||||
|
<idref bean="SearchService_security"/>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
<bean id="SearchService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
<bean id="SearchService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||||
<property name="transactionManager">
|
<property name="transactionManager">
|
||||||
<ref bean="transactionManager"/>
|
<ref bean="transactionManager"/>
|
||||||
@@ -692,7 +709,7 @@
|
|||||||
|
|
||||||
<bean id="crossRepositoryCopyService" class="org.alfresco.repo.copy.CrossRepositoryCopyServiceImpl">
|
<bean id="crossRepositoryCopyService" class="org.alfresco.repo.copy.CrossRepositoryCopyServiceImpl">
|
||||||
<property name="avmService">
|
<property name="avmService">
|
||||||
<ref bean="avmService"/>
|
<ref bean="indexingAVMService"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="nodeService">
|
<property name="nodeService">
|
||||||
<ref bean="nodeService"/>
|
<ref bean="nodeService"/>
|
||||||
|
@@ -38,6 +38,8 @@ import org.alfresco.service.cmr.repository.ContentService;
|
|||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory for AVM indexers and searchers
|
* Factory for AVM indexers and searchers
|
||||||
@@ -47,6 +49,8 @@ import org.alfresco.service.namespace.NamespaceService;
|
|||||||
*/
|
*/
|
||||||
public class AVMLuceneIndexerAndSearcherFactory extends AbstractLuceneIndexerAndSearcherFactory
|
public class AVMLuceneIndexerAndSearcherFactory extends AbstractLuceneIndexerAndSearcherFactory
|
||||||
{
|
{
|
||||||
|
private static Log s_logger = LogFactory.getLog(AVMLuceneIndexerAndSearcherFactory.class);
|
||||||
|
|
||||||
private DictionaryService dictionaryService;
|
private DictionaryService dictionaryService;
|
||||||
|
|
||||||
private NamespaceService nameSpaceService;
|
private NamespaceService nameSpaceService;
|
||||||
@@ -61,6 +65,11 @@ public class AVMLuceneIndexerAndSearcherFactory extends AbstractLuceneIndexerAnd
|
|||||||
|
|
||||||
private ContentStore contentStore;
|
private ContentStore contentStore;
|
||||||
|
|
||||||
|
public AVMLuceneIndexerAndSearcherFactory()
|
||||||
|
{
|
||||||
|
s_logger.error("Creating AVMLuceneIndexerAndSearcherFactory");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the dictionary service
|
* Set the dictionary service
|
||||||
* @param dictionaryService
|
* @param dictionaryService
|
||||||
|
@@ -250,6 +250,10 @@ public class AVMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<String> impl
|
|||||||
{
|
{
|
||||||
return docs;
|
return docs;
|
||||||
}
|
}
|
||||||
|
if (desc.isLayeredDirectory() || desc.isLayeredFile())
|
||||||
|
{
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
|
|
||||||
List<Pair<Integer, String>> paths = avmService.getHeadPaths(desc);
|
List<Pair<Integer, String>> paths = avmService.getHeadPaths(desc);
|
||||||
if(paths.size() == 0)
|
if(paths.size() == 0)
|
||||||
|
@@ -83,18 +83,18 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
|
|||||||
* indexer for each store within a transaction
|
* indexer for each store within a transaction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static Map<Xid, Map<StoreRef, LuceneIndexer>> activeIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
private Map<Xid, Map<StoreRef, LuceneIndexer>> activeIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Suspended global transactions.
|
* Suspended global transactions.
|
||||||
*/
|
*/
|
||||||
private static Map<Xid, Map<StoreRef, LuceneIndexer>> suspendedIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
private Map<Xid, Map<StoreRef, LuceneIndexer>> suspendedIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thread local indexers - used outside a global transaction
|
* Thread local indexers - used outside a global transaction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static ThreadLocal<Map<StoreRef, LuceneIndexer>> threadLocalIndexers = new ThreadLocal<Map<StoreRef, LuceneIndexer>>();
|
private ThreadLocal<Map<StoreRef, LuceneIndexer>> threadLocalIndexers = new ThreadLocal<Map<StoreRef, LuceneIndexer>>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The dafault timeout for transactions TODO: Respect this
|
* The dafault timeout for transactions TODO: Respect this
|
||||||
@@ -311,7 +311,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
|
|||||||
* @param tx
|
* @param tx
|
||||||
* @return - the transaction id
|
* @return - the transaction id
|
||||||
*/
|
*/
|
||||||
private static String getTransactionId(Transaction tx, StoreRef storeRef)
|
private String getTransactionId(Transaction tx, StoreRef storeRef)
|
||||||
{
|
{
|
||||||
if (tx instanceof SimpleTransaction)
|
if (tx instanceof SimpleTransaction)
|
||||||
{
|
{
|
||||||
|
@@ -1442,7 +1442,7 @@ public class IndexInfo
|
|||||||
{
|
{
|
||||||
public void beforeWithReadLock(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
public void beforeWithReadLock(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||||
{
|
{
|
||||||
|
closeDelta(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void transition(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
public void transition(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||||
|
@@ -80,6 +80,11 @@
|
|||||||
<property name="usr:members">
|
<property name="usr:members">
|
||||||
<type>d:text</type>
|
<type>d:text</type>
|
||||||
<multiple>true</multiple>
|
<multiple>true</multiple>
|
||||||
|
<index enabled="true">
|
||||||
|
<atomic>true</atomic>
|
||||||
|
<stored>false</stored>
|
||||||
|
<tokenised>false</tokenised>
|
||||||
|
</index>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<associations>
|
<associations>
|
||||||
|
Reference in New Issue
Block a user