exo-jcr SVN: r1364 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-12 08:39:22 -0500 (Tue, 12 Jan 2010)
New Revision: 1364
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
Log:
EXOJCR-331 : setTransactionTimeout(Integer.MAX_VALUE)
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-12 13:30:30 UTC (rev 1363)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-12 13:39:22 UTC (rev 1364)
@@ -199,7 +199,8 @@
try
{
transactionManager.begin();
- transactionManager.setTransactionTimeout(20);
+ //should be configured from xml in feature
+ transactionManager.setTransactionTimeout(Integer.MAX_VALUE);
cache.beginTransaction();
super.save(changesLog);
cache.commitTransaction();
16 years, 4 months
exo-jcr SVN: r1363 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: storage/jbosscache and 1 other directory.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2010-01-12 08:30:30 -0500 (Tue, 12 Jan 2010)
New Revision: 1363
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
Log:
EXOJCR-325: Remove the data from the Cache indexer once the data has been indexed to prevent memory leak
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2010-01-12 13:16:32 UTC (rev 1362)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2010-01-12 13:30:30 UTC (rev 1363)
@@ -90,8 +90,16 @@
}
// updating index
ChangesFilterListsWrapper wrapper = (ChangesFilterListsWrapper)value;
- updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(), wrapper
- .getParentRemovedNodes());
+ try
+ {
+ updateIndex(wrapper.getAddedNodes(), wrapper.getRemovedNodes(), wrapper.getParentAddedNodes(), wrapper
+ .getParentRemovedNodes());
+ }
+ finally
+ {
+ // remove the data from the cache
+ cache.removeNode(name);
+ }
}
return null;
}
@@ -99,11 +107,9 @@
/**
* @see org.exoplatform.services.jcr.impl.storage.jbosscache.AbstractWriteOnlyCacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
*/
- @Override
public void put(Fqn arg0, Map<Object, Object> arg1) throws Exception
{
// ignoring call cacheRoot.addChild(PARAMETER_ROOT).setResident(true);
-
}
/**
@@ -116,6 +122,14 @@
}
/**
+ * @see org.jboss.cache.loader.CacheLoader#remove(org.jboss.cache.Fqn)
+ */
+ public void remove(Fqn arg0) throws Exception
+ {
+ // do nothing
+ }
+
+ /**
* Switches Indexer mode from RO to RW, or from RW to RO
*
* @param ioMode
@@ -199,5 +213,4 @@
}
}
}
-
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-01-12 13:16:32 UTC (rev 1362)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2010-01-12 13:30:30 UTC (rev 1363)
@@ -83,22 +83,6 @@
/**
* {@inheritDoc}
*/
- public void put(Fqn arg0, Map<Object, Object> arg1) throws Exception
- {
- throw new WriteOnlyCacheLoaderException("The method 'put(Fqn arg0, Map<Object, Object> arg1))' should not be called.");
- }
-
- /**
- * {@inheritDoc}
- */
- public void remove(Fqn arg0) throws Exception
- {
- throw new WriteOnlyCacheLoaderException("The method 'remove(Fqn arg0)' should not be called.");
- }
-
- /**
- * {@inheritDoc}
- */
public Object remove(Fqn arg0, Object arg1) throws Exception
{
throw new WriteOnlyCacheLoaderException("The method 'remove(Fqn arg0, Object arg1)' should not be called.");
16 years, 4 months
exo-jcr SVN: r1362 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-01-12 08:16:32 -0500 (Tue, 12 Jan 2010)
New Revision: 1362
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
Log:
reverted to the previos state (r1119)
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml 2010-01-12 13:13:21 UTC (rev 1361)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml 2010-01-12 13:16:32 UTC (rev 1362)
@@ -1,13 +1,23 @@
+<!--
- <!--
+ Copyright (C) 2009 eXo Platform SAS.
- Copyright (C) 2009 eXo Platform SAS. This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This software is
- distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
- this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
- http://www.fsf.org.
- -->
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
<repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
@@ -20,7 +30,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
+ <property name="dialect" value="hsqldb" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -29,7 +39,7 @@
<value-storages>
<value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/production" />
+ <property name="path" value="../temp/values/production" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -42,16 +52,15 @@
<property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
<properties>
- <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-production.xml" />
+ <property name="max-size" value="10k" />
+ <property name="live-time" value="1h" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
- <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-production.xml" />
+ <property name="index-dir" value="../temp/jcrlucenedb/production" />
</properties>
</query-handler>
<lock-manager>
@@ -68,7 +77,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
+ <property name="dialect" value="hsqldb" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -77,7 +86,7 @@
<value-storages>
<value-storage id="draft" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/backup" />
+ <property name="path" value="../temp/values/backup" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -90,16 +99,15 @@
<property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
<properties>
- <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-backup.xml" />
+ <property name="max-size" value="10k" />
+ <property name="live-time" value="1h" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/backup" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
- <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-backup.xml" />
+ <property name="index-dir" value="../temp/jcrlucenedb/backup" />
</properties>
</query-handler>
</workspace>
@@ -108,7 +116,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="oracle" />
+ <property name="dialect" value="hsqldb" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -117,7 +125,7 @@
<value-storages>
<value-storage id="digital-assets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="/mnt/tornado/temp/values/digital-assets" />
+ <property name="path" value="../temp/values/digital-assets" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -130,16 +138,15 @@
<property name="root-nodetype" value="nt:folder" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
<properties>
- <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-digital-assets.xml" />
+ <property name="max-size" value="5k" />
+ <property name="live-time" value="15m" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/digital-assets" />
- <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
- <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-digital-assets.xml" />
+ <property name="index-dir" value="../temp/jcrlucenedb/digital-assets" />
</properties>
</query-handler>
</workspace>
16 years, 4 months
exo-jcr SVN: r1361 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/lab/cluster/test and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-12 08:13:21 -0500 (Tue, 12 Jan 2010)
New Revision: 1361
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestCacheDeadLockDetection.java
Log:
EXOJCR-371: Completed DeadLockDetectionTest, added some comments and license to BufferedJBossCache.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2010-01-12 12:39:16 UTC (rev 1360)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2010-01-12 13:13:21 UTC (rev 1361)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
import org.jboss.cache.Cache;
@@ -21,6 +39,13 @@
import javax.transaction.TransactionManager;
+/**
+ * Decorator over the JBossCache that stores changes in buffer, then sorts and applies to JBossCache.
+ *
+ * @author <a href="mailto:Sergey.Kabashnyuk@exoplatform.org">Sergey Kabashnyuk</a>
+ * @version $Id: BufferedJBossCache.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
+ *
+ */
@SuppressWarnings("unchecked")
public class BufferedJBossCache implements Cache<Serializable, Object>
{
@@ -513,8 +538,6 @@
/**
* Container for changes
- * @author sj
- *
*/
public static abstract class ChangesContainer implements Comparable<ChangesContainer>
{
@@ -579,8 +602,6 @@
/**
* Put object container;
- * @author sj
- *
*/
public static class PutObjectContainer extends ChangesContainer
{
@@ -603,8 +624,6 @@
/**
* Put container.
- * @author sj
- *
*/
public static class PutKeyValueContainer extends ChangesContainer
{
@@ -629,8 +648,6 @@
/**
* Remove container.
- * @author sj
- *
*/
public static class RemoveKeyContainer extends ChangesContainer
{
@@ -653,8 +670,6 @@
/**
* Remove container.
- * @author sj
- *
*/
public static class RemoveNodeContainer extends ChangesContainer
{
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestCacheDeadLockDetection.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestCacheDeadLockDetection.java 2010-01-12 12:39:16 UTC (rev 1360)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestCacheDeadLockDetection.java 2010-01-12 13:13:21 UTC (rev 1361)
@@ -25,11 +25,25 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.concurrent.CountDownLatch;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
/**
+ * Test that proves BufferedJBossCache as a solution against dead-locks.
+ * Was tested with lockAcquisitionTimeout="10000" (10s).
+ * If ordering is not done in BufferedJBossCache then this test shown TimeOutException
+ * when one thread waits for another one. Like this:
+ *
+ * org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/$CHILD_NODES_LIST/2235b1da7f0000014f62cf6a381e342f]
+ * after [10000] milliseconds for requestor [GlobalTransaction:<null>:243]! Lock held by [GlobalTransaction:<null>:244]
+ * org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/$CHILD_NODES_LIST/2235b1d67f0000017209d9af66cfae9a]
+ * after [10000] milliseconds for requestor [GlobalTransaction:<null>:244]! Lock held by [GlobalTransaction:<null>:243]
+ *
+ * When running this test you should manually check that this is really a dead-lock when the first thread is waiting for
+ * the second and the second for the first one. (like example when TX243 waits TX244 and contrary)
+ *
* @author <a href="mailto:nikolazius@gmail.com">Nikolay Zamosenchuk</a>
* @version $Id: TestLoadIndexerWriter.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
*
@@ -57,8 +71,10 @@
private int propertyCount = 200;
- private int nodeCount = 100;
+ private int nodeCount = 10;
+ private CountDownLatch latch;
+
public void testWrite() throws RepositoryException
{
log.info("Creating threads...");
@@ -83,6 +99,11 @@
stop = true;
}
+ /**
+ * sleeps for milliseconds.
+ *
+ * @param time
+ */
private void sleep(long time)
{
try
@@ -95,6 +116,23 @@
}
}
+ /**
+ * returns "active" latch if it is not null and not achieved 0.
+ * otherwise returns new latch.
+ * @return
+ */
+ private synchronized CountDownLatch getLatch()
+ {
+ if (latch == null || latch.getCount() == 0)
+ {
+ latch = new CountDownLatch(threadCount);
+ }
+ return latch;
+ }
+
+ /**
+ * This is the runnable task, that performs write to 2 different nodes, but in different contrary order.
+ */
private class WriterTask implements Runnable
{
private int id;
@@ -136,9 +174,19 @@
fillNode(nodeB, index);
fillNode(nodeA, index);
}
+ // session.save() should be synchronized between threads.
+ CountDownLatch latch = getLatch();
+ latch.countDown();
+ try
+ {
+ // when all threads are ready, await will resume the control flow
+ latch.await();
+ }
+ catch (InterruptedException e)
+ {
+ }
sessionLocal.save();
- log.info("#");
- //System.out.print("#");
+ System.out.print("#");
}
}
catch (RepositoryException e)
@@ -151,6 +199,13 @@
}
}
+ /**
+ * Simply adds lots of nodes and properties to the given parent.
+ *
+ * @param node
+ * @param index
+ * @throws RepositoryException
+ */
public void fillNode(Node node, int index) throws RepositoryException
{
for (int n = 0; n < nodeCount; n++)
16 years, 4 months
exo-jcr SVN: r1360 - /.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-01-12 07:39:16 -0500 (Tue, 12 Jan 2010)
New Revision: 1360
Removed:
exo.jcr.applications.backupconsole/
exo.jcr.applications.browser/
exo.jcr.applications.fckeditor/
exo.jcr.applications.rest/
exo.jcr.component.cluster.test.client/
exo.jcr.component.core JBCCACHE/
exo.jcr.component.core/
exo.jcr.component.ext/
exo.jcr.component.ftp/
exo.jcr.component.webdav/
exo.jcr.connectors.localadapter/
exo.jcr.ear/
exo.jcr.framework.command/
exo.jcr.framework.ftpclient/
exo.jcr.framework.web/
Log:
16 years, 4 months
exo-jcr SVN: r1359 - /.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-01-12 06:48:07 -0500 (Tue, 12 Jan 2010)
New Revision: 1359
Added:
exo.jcr.applications.backupconsole/
exo.jcr.applications.browser/
exo.jcr.applications.fckeditor/
exo.jcr.applications.rest/
exo.jcr.component.cluster.test.client/
exo.jcr.component.ext/
exo.jcr.component.ftp/
exo.jcr.component.webdav/
exo.jcr.connectors.localadapter/
exo.jcr.ear/
exo.jcr.framework.command/
exo.jcr.framework.ftpclient/
exo.jcr.framework.web/
Log:
16 years, 4 months
exo-jcr SVN: r1358 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-12 06:36:48 -0500 (Tue, 12 Jan 2010)
New Revision: 1358
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/
Log:
ObjectStore ignored
Property changes on: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core
___________________________________________________________________
Name: svn:ignore
- .settings
target
.classpath
.project
+ .settings
target
.classpath
.project
ObjectStore
16 years, 4 months
exo-jcr SVN: r1357 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main: java/org/exoplatform/services/transaction and 2 other directories.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-01-12 06:35:39 -0500 (Tue, 12 Jan 2010)
New Revision: 1357
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/JBossTransactionManagerLookup.java
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
Log:
EXOJCR-334 org.exoplatform.services.transaction.jbosscache.JBossTransactionManagerLookup added
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/JBossTransactionManagerLookup.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/JBossTransactionManagerLookup.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/JBossTransactionManagerLookup.java 2010-01-12 11:35:39 UTC (rev 1357)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.transaction.jbosscache;
+
+import org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup;
+import org.jboss.cache.transaction.TransactionManagerLookup;
+
+import javax.transaction.TransactionManager;
+
+/**
+ * @author <a href="mailto:dmitry.kataev@exoplatform.com">Dmytro Katayev</a>
+ * @version $Id$
+ */
+public class JBossTransactionManagerLookup implements TransactionManagerLookup
+{
+
+ protected JBossStandaloneJTAManagerLookup jtaManagerLookup;
+
+ /**
+ *
+ */
+ public JBossTransactionManagerLookup(JBossStandaloneJTAManagerLookup jtaManagerLookup)
+ {
+ this.jtaManagerLookup = jtaManagerLookup;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public TransactionManager getTransactionManager() throws Exception
+ {
+ return jtaManagerLookup.getTransactionManager();
+ }
+
+}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml 2010-01-12 11:27:19 UTC (rev 1356)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/resources/conf/portal/exo-jcr-config.xml 2010-01-12 11:35:39 UTC (rev 1357)
@@ -1,23 +1,13 @@
-<!--
- Copyright (C) 2009 eXo Platform SAS.
+ <!--
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-
--->
+ Copyright (C) 2009 eXo Platform SAS. This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This software is
+ distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
+ this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
+ http://www.fsf.org.
+ -->
<repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
@@ -30,7 +20,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="hsqldb" />
+ <property name="dialect" value="oracle" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -39,7 +29,7 @@
<value-storages>
<value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="../temp/values/production" />
+ <property name="path" value="/mnt/tornado/temp/values/production" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -52,15 +42,16 @@
<property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="max-size" value="10k" />
- <property name="live-time" value="1h" />
+ <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-production.xml" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="../temp/jcrlucenedb/production" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/production" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
+ <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-production.xml" />
</properties>
</query-handler>
<lock-manager>
@@ -77,7 +68,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="hsqldb" />
+ <property name="dialect" value="oracle" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -86,7 +77,7 @@
<value-storages>
<value-storage id="draft" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="../temp/values/backup" />
+ <property name="path" value="/mnt/tornado/temp/values/backup" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -99,15 +90,16 @@
<property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="max-size" value="10k" />
- <property name="live-time" value="1h" />
+ <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-backup.xml" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="../temp/jcrlucenedb/backup" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/backup" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
+ <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-backup.xml" />
</properties>
</query-handler>
</workspace>
@@ -116,7 +108,7 @@
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
- <property name="dialect" value="hsqldb" />
+ <property name="dialect" value="oracle" />
<property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
@@ -125,7 +117,7 @@
<value-storages>
<value-storage id="digital-assets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path" value="../temp/values/digital-assets" />
+ <property name="path" value="/mnt/tornado/temp/values/digital-assets" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -138,15 +130,16 @@
<property name="root-nodetype" value="nt:folder" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
+ <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="max-size" value="5k" />
- <property name="live-time" value="15m" />
+ <property name="jbosscache-configuration" value="conf/portal/test-jbosscache-config-repository-digital-assets.xml" />
</properties>
</cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="../temp/jcrlucenedb/digital-assets" />
+ <property name="index-dir" value="/mnt/tornado/temp/jcrlucenedb/digital-assets" />
+ <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
+ <property name="changesfilter-config-path" value="conf/portal/test-jbosscache-indexer-config-repository-digital-assets.xml" />
</properties>
</query-handler>
</workspace>
16 years, 4 months
exo-jcr SVN: r1355 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test: resources/conf/cluster and 1 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-01-12 06:22:39 -0500 (Tue, 12 Jan 2010)
New Revision: 1355
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml
Log:
EXOJCR-385 : Eviction configuration was added to indexer cache.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestExoEvictionActionPolicy.java 2010-01-12 11:22:39 UTC (rev 1355)
@@ -164,7 +164,7 @@
@NodeEvicted
public void createdNodeEvent(NodeEvent ne)
{
- System.out.println("Node evicted: " + ne.getFqn());
+// System.out.println("Node evicted: " + ne.getFqn());
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -87,11 +87,11 @@
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="maxNodes" value="50000" />
- <property name="timeToLiveSeconds" value="900" />
+ <property name="timeToLive" value="900000" />
</default>
<region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ChildListEvictionActionPolicy" eventQueueSize="1000000">
<property name="maxNodes" value="50000" />
- <property name="timeToLiveSeconds" value="900" />
+ <property name="timeToLive" value="900000" />
</region>
</eviction>
</jbosscache>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -87,11 +87,11 @@
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="maxNodes" value="50000" />
- <property name="timeToLiveSeconds" value="900" />
+ <property name="timeToLive" value="900000" />
</default>
<region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ChildListEvictionActionPolicy" eventQueueSize="1000000">
<property name="maxNodes" value="50000" />
- <property name="timeToLiveSeconds" value="900" />
+ <property name="timeToLive" value="900000" />
</region>
</eviction>
</jbosscache>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -70,5 +70,16 @@
<sync />
</clustering>
<invocationBatching enabled="false" />
+
+ <eviction wakeUpInterval="3000">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="60000" />
+ </default>
+ <region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="60000" />
+ </region>
+ </eviction>
</jbosscache>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -70,5 +70,16 @@
<sync />
</clustering>
<invocationBatching enabled="false" />
+
+ <eviction wakeUpInterval="3000">
+ <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
+ <property name="maxNodes" value="5000" />
+ <property name="timeToLive" value="60000" />
+ </default>
+ <region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
+ <property name="maxNodes" value="10000" />
+ <property name="timeToLive" value="60000" />
+ </region>
+ </eviction>
</jbosscache>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -13,11 +13,11 @@
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="maxNodes" value="5000" />
- <property name="timeToLiveSeconds" value="120" />
+ <property name="timeToLive" value="120000" />
</default>
<region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ChildListEvictionActionPolicy" eventQueueSize="1000000">
<property name="maxNodes" value="20000" />
- <property name="timeToLiveSeconds" value="120" />
+ <property name="timeToLive" value="120000" />
</region>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml 2010-01-12 11:21:16 UTC (rev 1354)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-exo-config.xml 2010-01-12 11:22:39 UTC (rev 1355)
@@ -13,11 +13,11 @@
<eviction wakeUpInterval="3000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
<property name="maxNodes" value="50" />
- <property name="timeToLiveSeconds" value="20" />
+ <property name="timeToLive" value="20000" />
</default>
<region name="/" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ChildListEvictionActionPolicy" eventQueueSize="1000000">
<property name="maxNodes" value="50" />
- <property name="timeToLiveSeconds" value="20" />
+ <property name="timeToLive" value="20000" />
</region>
</eviction>
16 years, 4 months