Author: nzamosenchuk
Date: 2010-01-27 11:36:20 -0500 (Wed, 27 Jan 2010)
New Revision: 1594
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
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/jbosscache/JBossCacheIndexChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/config/TestTemplateConfigurationHelper.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/templateBased/test-jcr-config.xml
Log:
EXOJCR-434: Added support of ConfigurationManager for retrieving configuration files also
from JAR, WAR, EAR archives. Fixed indexer parameters in template-based configuration.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/TemplateConfigurationHelper.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.config;
+import org.exoplatform.container.configuration.ConfigurationManager;
+
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.IOException;
@@ -46,6 +48,8 @@
// list with exclude-patterns
private List<Pattern> excludes = new ArrayList<Pattern>();
+ private ConfigurationManager cfm;
+
/**
* Creates instance of template configuration helper with given lists of filtering
* patterns. Parameter will be included only if it matches any include-pattern and
@@ -57,10 +61,12 @@
*
* @param includes Array with string representation of include reg-exp patterns
* @param excludes Array with string representation of exclude reg-exp patterns
+ * @param ConfigurationManager instance for looking up resources
*/
- public TemplateConfigurationHelper(String[] includes, String[] excludes)
+ public TemplateConfigurationHelper(String[] includes, String[] excludes,
ConfigurationManager cfm)
{
super();
+ this.cfm = cfm;
// compile include patterns
for (String regex : includes)
{
@@ -77,12 +83,13 @@
* Creates instance of TemplateConfigurationHelper pre-configured for JBossCache
parameters,<br>
* including: "jbosscache-*" and "jgroups-configuration", and
excluding "jbosscache-configuration"
*
+ * @param ConfigurationManager instance for looking up resources
* @return
*/
- public static TemplateConfigurationHelper createJBossCacheHelper()
+ public static TemplateConfigurationHelper createJBossCacheHelper(ConfigurationManager
cfm)
{
return new TemplateConfigurationHelper(new String[]{"^jbosscache-.*",
"^jgroups-configuration"},
- new String[]{"^jbosscache-configuration"});
+ new String[]{"^jbosscache-configuration"}, cfm);
}
/**
@@ -124,17 +131,46 @@
*/
public InputStream fillTemplate(String filename, Map<String, String> parameters)
throws IOException
{
+ // try to get resource by class loader
ClassLoader cl = Thread.currentThread().getContextClassLoader();
InputStream inputStream = cl == null ? null : cl.getResourceAsStream(filename);
+
+ // check system class loader
if (inputStream == null)
{
- // check system class loader
inputStream = getClass().getClassLoader().getResourceAsStream(filename);
}
+
+ // try to get as file stream
if (inputStream == null)
{
- inputStream = new FileInputStream(filename);
+ try
+ {
+ inputStream = new FileInputStream(filename);
+ }
+ catch (IOException e)
+ {
+ // we'll try to get it through configuration manager also
+ }
}
+
+ // try to get using configuration manager
+ if (inputStream == null)
+ {
+ try
+ {
+ inputStream = cfm.getInputStream(filename);
+ }
+ catch (Exception e)
+ {
+ // Stream still remains to be null, exception will be thrown below
+ }
+ }
+ // inputStream still remains null, so file was not opened
+ if (inputStream == null)
+ {
+ throw new IOException("Can't find or open file:" + filename);
+ }
return fillTemplate(inputStream, parameters);
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -16,6 +16,7 @@
*/
package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.management.annotations.Managed;
import org.exoplatform.management.annotations.ManagedDescription;
import org.exoplatform.management.jmx.annotations.NameTemplate;
@@ -184,9 +185,9 @@
* @throws RepositoryConfigurationException
*/
public CacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry
config,
- InitialContextInitializer context, TransactionService transactionService) throws
RepositoryConfigurationException
+ InitialContextInitializer context, TransactionService
transactionService,ConfigurationManager cfm) throws RepositoryConfigurationException
{
- this(dataManager, config, context, transactionService.getTransactionManager());
+ this(dataManager, config, context, transactionService.getTransactionManager(),
cfm);
}
/**
@@ -198,9 +199,9 @@
* @throws RepositoryConfigurationException
*/
public CacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry
config,
- InitialContextInitializer context) throws RepositoryConfigurationException
+ InitialContextInitializer context,ConfigurationManager cfm) throws
RepositoryConfigurationException
{
- this(dataManager, config, context, (TransactionManager)null);
+ this(dataManager, config, context, (TransactionManager)null,cfm);
}
/**
@@ -214,7 +215,7 @@
* @throws RepositoryConfigurationException
*/
public CacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry
config,
- InitialContextInitializer context, TransactionManager transactionManager) throws
RepositoryConfigurationException
+ InitialContextInitializer context, TransactionManager transactionManager,
ConfigurationManager cfm) throws RepositoryConfigurationException
{
lockRoot = Fqn.fromElements(LOCKS);
@@ -257,7 +258,7 @@
.getCacheConfig();
// initialize template
- TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper(cfm);
InputStream configStream;
try
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/DefaultChangesFilter.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.core.query;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.log.ExoLogger;
@@ -50,9 +51,9 @@
*/
public DefaultChangesFilter(SearchManager searchManager, SearchManager
parentSearchManager,
QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree
parentIndexingTree, QueryHandler handler,
- QueryHandler parentHandler) throws IOException, RepositoryConfigurationException,
RepositoryException
+ QueryHandler parentHandler, ConfigurationManager cfm) throws IOException,
RepositoryConfigurationException, RepositoryException
{
- super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree,
handler, parentHandler);
+ super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree,
handler, parentHandler, cfm);
IndexerIoModeHandler modeHandler = new
IndexerIoModeHandler(IndexerIoMode.READ_WRITE);
handler.setIndexerIoModeHandler(modeHandler);
parentHandler.setIndexerIoModeHandler(modeHandler);
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.core.query;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
import org.exoplatform.services.jcr.dataflow.ItemState;
import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
@@ -67,7 +68,7 @@
*/
public IndexerChangesFilter(SearchManager searchManager, SearchManager
parentSearchManager,
QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree
parentIndexingTree, QueryHandler handler,
- QueryHandler parentHandler)
+ QueryHandler parentHandler, ConfigurationManager cfm)
{
super();
this.searchManager = searchManager;
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 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -649,12 +649,12 @@
}
Constructor<? extends IndexerChangesFilter> constuctor =
changesFilterClass.getConstructor(SearchManager.class, SearchManager.class,
QueryHandlerEntry.class,
- IndexingTree.class, IndexingTree.class, QueryHandler.class,
QueryHandler.class);
+ IndexingTree.class, IndexingTree.class, QueryHandler.class,
QueryHandler.class, ConfigurationManager.class);
if (parentSearchManager != null)
{
newChangesFilter =
constuctor.newInstance(this, parentSearchManager, config, indexingTree,
parentSearchManager
- .getIndexingTree(), handler, parentSearchManager.getHandler());
+ .getIndexingTree(), handler, parentSearchManager.getHandler(), cfm);
}
}
catch (SecurityException e)
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.core.query.jbosscache;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
import org.exoplatform.services.jcr.config.QueryHandlerParams;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
@@ -72,13 +73,13 @@
*/
public JBossCacheIndexChangesFilter(SearchManager searchManager, SearchManager
parentSearchManager,
QueryHandlerEntry config, IndexingTree indexingTree, IndexingTree
parentIndexingTree, QueryHandler handler,
- QueryHandler parentHandler) throws IOException, RepositoryException,
RepositoryConfigurationException
+ QueryHandler parentHandler, ConfigurationManager cfm) throws IOException,
RepositoryException, RepositoryConfigurationException
{
- super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree,
handler, parentHandler);
+ super(searchManager, parentSearchManager, config, indexingTree, parentIndexingTree,
handler, parentHandler, cfm);
String jbcConfig =
config.getParameterValue(QueryHandlerParams.PARAM_JBOSSCACHE_CONFIGURATION);
// initialize template
- TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper(cfm);
InputStream configStream;
try
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
+import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.access.AccessControlList;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.SimpleParameterEntry;
@@ -256,7 +257,7 @@
* @throws RepositoryException if error of initialization
* @throws RepositoryConfigurationException if error of configuration
*/
- public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, TransactionService
transactionService)
+ public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, TransactionService
transactionService, ConfigurationManager cfm)
throws RepositoryException, RepositoryConfigurationException
{
if (wsConfig.getCache() == null)
@@ -269,7 +270,7 @@
LOG.info("JBoss Cache configuration used: " + jbcConfig);
// initialize template
- TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper configurationHelper =
TemplateConfigurationHelper.createJBossCacheHelper(cfm);
InputStream configStream;
try
{
@@ -310,10 +311,10 @@
* @throws RepositoryException if error of initialization
* @throws RepositoryConfigurationException if error of configuration
*/
- public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig) throws
RepositoryException,
+ public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, ConfigurationManager
cfm) throws RepositoryException,
RepositoryConfigurationException
{
- this(wsConfig, null);
+ this(wsConfig, null, cfm);
}
/**
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/config/TestTemplateConfigurationHelper.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/config/TestTemplateConfigurationHelper.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/config/TestTemplateConfigurationHelper.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.config;
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
+
import junit.framework.TestCase;
import java.io.ByteArrayInputStream;
@@ -37,7 +39,8 @@
public void testFilters()
{
// create helper with predefined include and exclude patterns
- TemplateConfigurationHelper helper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper helper =
+ TemplateConfigurationHelper.createJBossCacheHelper(new
ConfigurationManagerImpl());
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("jbosscache-configuration", "");
parameters.put("jbosscache-cache.loader", "");
@@ -51,11 +54,11 @@
assertTrue(preparedParameters.containsKey("${jbosscache-cache.loader}"));
assertTrue(preparedParameters.containsKey("${jbosscache-clustername}"));
}
-
+
public void testFilters2()
{
// create helper with predefined include and exclude patterns
- TemplateConfigurationHelper helper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper helper =
TemplateConfigurationHelper.createJBossCacheHelper(new ConfigurationManagerImpl());
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("jgroups-configuration", "");
parameters.put("jbosscache-cache.loader", "");
@@ -71,7 +74,7 @@
public void testTemplating() throws IOException
{
- TemplateConfigurationHelper helper =
TemplateConfigurationHelper.createJBossCacheHelper();
+ TemplateConfigurationHelper helper =
TemplateConfigurationHelper.createJBossCacheHelper(new ConfigurationManagerImpl());
String template = "configuration in any format, containing
${jbosscache-template-variable} and many others";
String expectedConfig = "configuration in any format, containing pretty good
parameter and many others";
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestJBossCacheWorkspaceStorageCache.java 2010-01-27
16:36:20 UTC (rev 1594)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.dataflow.persistent;
+import org.exoplatform.container.configuration.ConfigurationManagerImpl;
import org.exoplatform.services.jcr.config.CacheEntry;
import org.exoplatform.services.jcr.config.SimpleParameterEntry;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
@@ -41,13 +42,15 @@
{
TransactionService transactionService =
(TransactionService)container.getComponentInstanceOfType(TransactionService.class);
-
+
ArrayList<SimpleParameterEntry> list = new
ArrayList<SimpleParameterEntry>();
- list.add(new
SimpleParameterEntry(JBossCacheWorkspaceStorageCache.JBOSSCACHE_CONFIG,
"conf/standalone/test-jbosscache-config.xml"));
-
+ list.add(new
SimpleParameterEntry(JBossCacheWorkspaceStorageCache.JBOSSCACHE_CONFIG,
+ "jar:/conf/standalone/test-jbosscache-config.xml"));
+
CacheEntry entry = new CacheEntry(list);
WorkspaceEntry workspaceEntry = new WorkspaceEntry();
workspaceEntry.setCache(entry);
- return new JBossCacheWorkspaceStorageCache(workspaceEntry, transactionService ==
null ? null : transactionService);
+ return new JBossCacheWorkspaceStorageCache(workspaceEntry,
+ transactionService == null ? null : transactionService, new
ConfigurationManagerImpl());
}
}
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/templateBased/test-jcr-config.xml
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/templateBased/test-jcr-config.xml 2010-01-27
16:11:03 UTC (rev 1593)
+++
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/templateBased/test-jcr-config.xml 2010-01-27
16:36:20 UTC (rev 1594)
@@ -139,6 +139,14 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1-ws1" />
<property name="max-volatile-time" value="60"
/>
+
+ <property name="synonymprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting"
value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
+
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -196,6 +204,14 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1-ws2" />
<property name="max-volatile-time" value="60"
/>
+
+ <property name="synonymprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting"
value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
+
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -230,35 +246,32 @@
<property name="swap-directory"
value="target/temp/swap/ws3" />
</properties>
<value-storages>
- <!--
- This storage is used to check whether properties are removed
- correctly from each value-storage
- (TestRemoveFromValueStorage.java)
- -->
- <value-storage id="ws3_big"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3_big"
/>
- </properties>
- <filters>
- <filter property-type="Binary" min-value-size="1024K"
/>
- </filters>
- </value-storage>
- <value-storage id="ws3"
- class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
- <properties>
- <property name="path" value="target/temp/values/ws3"
/>
- <property name="digest-algo" value="MD5" />
- <property name="vcas-type"
- value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl"
/>
- <property name="jdbc-source-name" value="jdbcjcr3" />
- <property name="jdbc-dialect" value="mysql" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
+ <!--
+ This storage is used to check whether properties are removed
+ correctly from each value-storage
+ (TestRemoveFromValueStorage.java)
+ -->
+ <value-storage id="ws3_big"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <properties>
+ <property name="path"
value="target/temp/values/ws3_big" />
+ </properties>
+ <filters>
+ <filter property-type="Binary"
min-value-size="1024K" />
+ </filters>
+ </value-storage>
+ <value-storage id="ws3"
class="org.exoplatform.services.jcr.impl.storage.value.fs.CASableTreeFileValueStorage">
+ <properties>
+ <property name="path"
value="target/temp/values/ws3" />
+ <property name="digest-algo" value="MD5"
/>
+ <property name="vcas-type"
value="org.exoplatform.services.jcr.impl.storage.value.cas.JDBCValueContentAddressStorageImpl"
/>
+ <property name="jdbc-source-name"
value="jdbcjcr" />
+ <property name="jdbc-dialect"
value="hsqldb" />
+ </properties>
+ <filters>
+ <filter property-type="Binary" />
+ </filters>
+ </value-storage>
+ </value-storages>
</container>
<cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
@@ -275,6 +288,17 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1-ws3" />
<property name="max-volatile-time" value="60"
/>
+
+ <property name="synonymprovider-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting" value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
+ value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
+ value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
+
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -351,6 +375,14 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1tck-ws" />
<property name="max-volatile-time" value="60"
/>
+
+ <property name="synonymprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting"
value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="excerptprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"
/>
+ <property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -415,6 +447,12 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1tck-ws1" />
<property name="max-volatile-time" value="60"
/>
+ <property name="synonymprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting"
value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -479,6 +517,15 @@
<property name="jgroups-configuration"
value="udp.xml" />
<property name="jbosscache-cluster-name"
value="JCR-cluster-indexer-db1tck-ws2" />
<property name="max-volatile-time" value="60"
/>
+ <property name="synonymprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"
/>
+ <property name="synonymprovider-config-path"
value="../../synonyms.properties" />
+ <property name="support-highlighting"
value="true" />
+ <property name="indexing-configuration-path"
value="../../indexing-configuration.xml" />
+ <property name="query-class"
value="org.exoplatform.services.jcr.impl.core.query.QueryImpl" />
+ <property name="spellchecker-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval"
/>
+ <property name="excerptprovider-class"
value="org.exoplatform.services.jcr.impl.core.query.lucene.WeightedHTMLExcerpt"/>
+ <property name="extractorPoolSize"
value="2"/>
+ <property name="extractorTimeout"
value="10"/>
</properties>
</query-handler>
<lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">