mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RSOLR 019: Lucene to SOLR switchover administration
- related build fixes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29155 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -11,6 +11,12 @@
|
||||
for anything to work
|
||||
-->
|
||||
<import resource="classpath:alfresco/application-context-core.xml" />
|
||||
|
||||
<!-- required to bring up the search subsystem -->
|
||||
<import resource="classpath:alfresco/cmis-api-context.xml" />
|
||||
<import resource="classpath:alfresco/opencmis-context.xml" />
|
||||
<import resource="classpath:alfresco/thumbnail-service-context.xml"/>
|
||||
<import resource="classpath:alfresco/rendition-services-context.xml"/>
|
||||
|
||||
<!--
|
||||
Import all modules and related components.
|
||||
|
@@ -24,6 +24,7 @@ import javax.transaction.Status;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptor;
|
||||
import org.alfresco.repo.search.Indexer;
|
||||
import org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer;
|
||||
@@ -86,7 +87,9 @@ public class AVMRemoteSnapshotTrackerTest extends BaseSpringTest
|
||||
ftsIndexer = (FullTextSearchIndexer) applicationContext.getBean("LuceneFullTextSearchIndexer");
|
||||
indexer = (Indexer) applicationContext.getBean("indexerComponent");
|
||||
nodeDAO = (NodeDAO) applicationContext.getBean("nodeDAO");
|
||||
threadPoolExecutor = (ThreadPoolExecutor) applicationContext.getBean("indexTrackerThreadPoolExecutor");
|
||||
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) applicationContext.getBean("lucene");
|
||||
threadPoolExecutor = (ThreadPoolExecutor) luceneSubSystem.getApplicationContext().getBean("search.indexTrackerThreadPoolExecutor");
|
||||
|
||||
|
||||
testTX = transactionService.getUserTransaction();
|
||||
|
@@ -27,6 +27,7 @@ import junit.framework.TestCase;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.domain.node.Transaction;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.node.index.AbstractReindexComponent.InIndex;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -57,8 +58,9 @@ public class FullIndexRecoveryComponentTest extends TestCase
|
||||
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
indexRecoverer = (FullIndexRecoveryComponent) ctx.getBean("indexRecoveryComponent");
|
||||
avmIndexRecoveryComponent = (AVMFullIndexRecoveryComponent) ctx.getBean("avmIndexRecoveryComponent");
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) ctx.getBean("lucene");
|
||||
indexRecoverer = (FullIndexRecoveryComponent) luceneSubSystem.getApplicationContext().getBean("search.indexRecoveryComponent");
|
||||
avmIndexRecoveryComponent = (AVMFullIndexRecoveryComponent) luceneSubSystem.getApplicationContext().getBean("search.avmIndexRecoveryComponent");
|
||||
nodeService = (NodeService) ctx.getBean("nodeService");
|
||||
transactionService = (TransactionService) ctx.getBean("transactionComponent");
|
||||
authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
|
@@ -25,6 +25,7 @@ import junit.framework.TestCase;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.ContentStore;
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.search.Indexer;
|
||||
import org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
@@ -70,7 +71,8 @@ public class IndexTransactionTrackerTest extends TestCase
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
searchService = (SearchService) ctx.getBean("searchService");
|
||||
nodeService = (NodeService) ctx.getBean("nodeService");
|
||||
threadPoolExecutor = (ThreadPoolExecutor) ctx.getBean("indexTrackerThreadPoolExecutor");
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) ctx.getBean("lucene");
|
||||
threadPoolExecutor = (ThreadPoolExecutor) luceneSubSystem.getApplicationContext().getBean("search.indexTrackerThreadPoolExecutor");
|
||||
fileFolderService = serviceRegistry.getFileFolderService();
|
||||
authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
contentStore = (ContentStore) ctx.getBean("fileContentStore");
|
||||
|
@@ -27,6 +27,7 @@ import org.alfresco.repo.content.ContentContext;
|
||||
import org.alfresco.repo.content.ContentStore;
|
||||
import org.alfresco.repo.content.filestore.FileContentStore;
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.search.Indexer;
|
||||
import org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl;
|
||||
import org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer;
|
||||
@@ -73,7 +74,9 @@ public class MissingContentReindexComponentTest extends TestCase
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
searchService = serviceRegistry.getSearchService();
|
||||
nodeService = serviceRegistry.getNodeService();
|
||||
threadPoolExecutor = (ThreadPoolExecutor) ctx.getBean("indexTrackerThreadPoolExecutor");
|
||||
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) ctx.getBean("lucene");
|
||||
threadPoolExecutor = (ThreadPoolExecutor) luceneSubSystem.getApplicationContext().getBean("search.indexTrackerThreadPoolExecutor");
|
||||
fileFolderService = serviceRegistry.getFileFolderService();
|
||||
authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
contentStore = (ContentStore) ctx.getBean("fileContentStore");
|
||||
|
@@ -12,6 +12,7 @@ import javax.transaction.UserTransaction;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
@@ -53,7 +54,8 @@ public class ALF947Test extends TestCase
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
this.nodeService = (NodeService) ctx.getBean("dbNodeService");
|
||||
this.indexerAndSearcher = (LuceneIndexerAndSearcher) ctx.getBean("admLuceneIndexerAndSearcherFactory");
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) ctx.getBean("lucene");
|
||||
this.indexerAndSearcher = (LuceneIndexerAndSearcher) luceneSubSystem.getApplicationContext().getBean("search.admLuceneIndexerAndSearcherFactory");
|
||||
this.authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
this.transactionService = (TransactionService) ctx.getBean("transactionComponent");
|
||||
this.copyService = (CopyService) ctx.getBean("CopyService");
|
||||
|
@@ -23,6 +23,7 @@ import java.util.Collections;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||
import org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.LuceneIndexBackupComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -49,7 +50,9 @@ public class LuceneIndexBackupComponentTest extends TestCase
|
||||
{
|
||||
TransactionService transactionService = (TransactionService) ctx.getBean("transactionComponent");
|
||||
NodeService nodeService = (NodeService) ctx.getBean("NodeService");
|
||||
LuceneIndexerAndSearcher factory = (LuceneIndexerAndSearcher) ctx.getBean("admLuceneIndexerAndSearcherFactory");
|
||||
|
||||
ChildApplicationContextFactory luceneSubSystem = (ChildApplicationContextFactory) ctx.getBean("lucene");
|
||||
LuceneIndexerAndSearcher factory = (LuceneIndexerAndSearcher) luceneSubSystem.getApplicationContext().getBean("search.admLuceneIndexerAndSearcherFactory");
|
||||
|
||||
this.authenticationComponent = (AuthenticationComponent)ctx.getBean("authenticationComponent");
|
||||
this.authenticationComponent.setSystemUserAsCurrentUser();
|
||||
|
Reference in New Issue
Block a user