Author: tolusha
Date: 2011-02-18 09:26:16 -0500 (Fri, 18 Feb 2011)
New Revision: 3996
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
Log:
EXOJCR-1193: Index retrieval from coordinator node
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-02-18
14:19:44 UTC (rev 3995)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-02-18
14:26:16 UTC (rev 3996)
@@ -203,6 +203,11 @@
private RemoteCommand resume;
/**
+ * Index recovery.
+ */
+ private final IndexRecovery indexRecovery;
+
+ /**
* Request to all nodes to check if there is someone who responsible for resuming.
*/
private RemoteCommand requestForResponsibleForResuming;
@@ -272,9 +277,17 @@
((WorkspacePersistentDataManager)this.itemMgr).addItemPersistenceListener(this);
}
- if (rpcService != null)
+ if (rpcService == null)
{
+ this.indexRecovery = null;
+ }
+ else
+ {
doInitRemoteCommands();
+
+ this.indexRecovery = new IndexRecoveryImpl(rpcService, this);
+ rpcService.registerTopologyChangeListener(this);
+
rpcService.registerTopologyChangeListener((TopologyChangeListener)indexRecovery);
}
}
@@ -688,8 +701,6 @@
throw new RepositoryConfigurationException(e);
}
- IndexRecovery indexRecovery = rpcService == null ? null : new
IndexRecoveryImpl(rpcService, this);
-
QueryHandlerContext context =
new QueryHandlerContext(container, itemMgr, indexingTree, nodeTypeDataManager,
nsReg, parentHandler,
PrivilegedFileHelper.getAbsolutePath(getIndexDirectory()), extractor, true,
virtualTableResolver,
@@ -1083,8 +1094,6 @@
return isResponsibleForResuming;
}
});
-
- rpcService.registerTopologyChangeListener(this);
}
protected void suspendLocally() throws SuspendException
Show replies by date