exo-jcr SVN: r1344 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-11 10:08:10 -0500 (Mon, 11 Jan 2010)
New Revision: 1344
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
Log:
EXOJCR-381: rollback of prev commit
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2010-01-11 15:07:25 UTC (rev 1343)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2010-01-11 15:08:10 UTC (rev 1344)
@@ -156,8 +156,6 @@
if (!config.getRepositoryConfigurations().contains(rEntry))
{
config.getRepositoryConfigurations().add(rEntry);
- // save config
- config.retain();
}
addNamespaces(rEntry.getName());
16 years, 4 months
exo-jcr SVN: r1343 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-11 10:07:25 -0500 (Mon, 11 Jan 2010)
New Revision: 1343
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
Log:
EXOJCR-381: retain repository configuration after a new repository create
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2010-01-11 13:55:28 UTC (rev 1342)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2010-01-11 15:07:25 UTC (rev 1343)
@@ -156,6 +156,8 @@
if (!config.getRepositoryConfigurations().contains(rEntry))
{
config.getRepositoryConfigurations().add(rEntry);
+ // save config
+ config.retain();
}
addNamespaces(rEntry.getName());
16 years, 4 months
exo-jcr SVN: r1342 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: test/java/org/exoplatform/services/jcr/impl/dataflow/persistent and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-01-11 08:55:28 -0500 (Mon, 11 Jan 2010)
New Revision: 1342
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestMultipleListenersNotifying.java
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-376: TestMultipleListenersNotifying added
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-11 12:35:47 UTC (rev 1341)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-11 13:55:28 UTC (rev 1342)
@@ -198,7 +198,6 @@
{
try
{
-
transactionManager.begin();
transactionManager.setTransactionTimeout(20);
cache.beginTransaction();
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestMultipleListenersNotifying.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestMultipleListenersNotifying.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestMultipleListenersNotifying.java 2010-01-11 13:55:28 UTC (rev 1342)
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.dataflow.persistent;
+
+import junit.framework.TestCase;
+
+import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
+import org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener;
+import org.exoplatform.services.jcr.impl.storage.SystemDataContainerHolder;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestMultipleListenersNotifying.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestMultipleListenersNotifying extends TestCase
+{
+
+ class TestDataManager extends WorkspacePersistentDataManager
+ {
+ public TestDataManager()
+ {
+ super(null, new SystemDataContainerHolder(null));
+ }
+ }
+
+ class Counter
+ {
+ int count = 0;
+
+ synchronized public void increment()
+ {
+ count++;
+ }
+
+ public int getCount()
+ {
+ return count;
+ }
+
+ public void reset()
+ {
+ count = 0;
+ }
+ }
+
+ class TestTxAwareListener implements ItemsPersistenceListener
+ {
+ boolean isTXAware;
+
+ Counter count;
+
+ public TestTxAwareListener(boolean isTXAware, Counter count)
+ {
+ this.isTXAware = isTXAware;
+ this.count = count;
+ }
+
+ public boolean isTXAware()
+ {
+ return isTXAware;
+ }
+
+ public void onSaveItems(ItemStateChangesLog itemStates)
+ {
+ count.increment();
+ }
+ }
+
+ public void testMultipleListenersNotify() throws Exception
+ {
+ int listTransCount = 27;
+ int listNotTransCount = 10;
+ TestDataManager mgr = new TestDataManager();
+
+ Counter countTrans = new Counter();
+ Counter countNotTrans = new Counter();
+ // set listeners
+ for (int i = 0; i < listTransCount; i++)
+ {
+ mgr.addItemPersistenceListener(new TestTxAwareListener(true, countTrans));
+ }
+ for (int i = 0; i < listNotTransCount; i++)
+ {
+ mgr.addItemPersistenceListener(new TestTxAwareListener(false, countNotTrans));
+ }
+
+ mgr.notifySaveItems(null, true);
+ assertEquals(listTransCount, countTrans.getCount());
+ assertEquals(0, countNotTrans.getCount());
+
+ countTrans.reset();
+ countNotTrans.reset();
+
+ mgr.notifySaveItems(null, false);
+ assertEquals(0, countTrans.getCount());
+ assertEquals(listNotTransCount, countNotTrans.getCount());
+ }
+}
16 years, 4 months
exo-jcr SVN: r1341 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext: replication and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-01-11 07:35:47 -0500 (Mon, 11 Jan 2010)
New Revision: 1341
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java
Log:
EXOJCR-376: added isTXAware methods
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2010-01-11 12:05:35 UTC (rev 1340)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2010-01-11 12:35:47 UTC (rev 1341)
@@ -224,4 +224,12 @@
return isSessionNull;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
+
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java 2010-01-11 12:05:35 UTC (rev 1340)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java 2010-01-11 12:35:47 UTC (rev 1341)
@@ -219,4 +219,12 @@
{
return channelManager;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
16 years, 4 months
exo-jcr SVN: r1340 - 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: sergiykarpenko
Date: 2010-01-11 07:05:35 -0500 (Mon, 11 Jan 2010)
New Revision: 1340
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/WorkspacePersistentDataManager.java
Log:
EXOJCR-376: removed redundant methods
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-11 11:39:43 UTC (rev 1339)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-11 12:05:35 UTC (rev 1340)
@@ -202,8 +202,7 @@
transactionManager.begin();
transactionManager.setTransactionTimeout(20);
cache.beginTransaction();
- // save changes and notify only txAware listeners
- super.saveInTransaction(changesLog);
+ super.save(changesLog);
cache.commitTransaction();
transactionManager.commit();
}
@@ -241,9 +240,9 @@
e.printStackTrace();
throw new RepositoryException(e.getLocalizedMessage(), e.getCause());
}
- // notify listeners after transaction commit
- super.postTransactionNotify(changesLog);
}
+ // notify listeners after transaction commit
+ super.notifySaveItems(changesLog, false);
}
/**
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-01-11 11:39:43 UTC (rev 1339)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-01-11 12:05:35 UTC (rev 1340)
@@ -119,33 +119,10 @@
public void save(final ItemStateChangesLog changesLog) throws RepositoryException
{
doSave(changesLog);
- notifySaveItems(changesLog);
+ notifySaveItems(changesLog, true);
}
/**
- * Saves the list of changes from this storage. And notifies listeners that are transaction aware.
- *
- * @param changesLog
- * @throws RepositoryException
- */
- public void saveInTransaction(final ItemStateChangesLog changesLog) throws RepositoryException
- {
- doSave(changesLog);
- notifySaveItemsOnTransaction(changesLog, true);
- }
-
- /**
- * Notifies listeners that are not transaction aware.
- * Must be called after transaction commit.
- *
- * @param changesLog
- */
- public void postTransactionNotify(final ItemStateChangesLog changesLog)
- {
- notifySaveItemsOnTransaction(changesLog, false);
- }
-
- /**
* Save the list of changes to storage.
*
* @param changesLog
@@ -592,40 +569,24 @@
}
/**
- * Notify all listeners about current changes log persistent state.
+ * Notify listeners about current changes log persistent state.
+ * Listeners notified according to is listener transaction aware.
*
* @param changesLog
* ItemStateChangesLog
+ * @param isListenerTXAware - is listeners notified in transaction, or after transaction
*/
- protected void notifySaveItems(final ItemStateChangesLog changesLog)
+ protected void notifySaveItems(final ItemStateChangesLog changesLog, boolean isListenerTXAware)
{
for (MandatoryItemsPersistenceListener mlistener : mandatoryListeners)
- mlistener.onSaveItems(changesLog);
-
- for (ItemsPersistenceListener listener : listeners)
{
- if (isListenerAccepted(listener))
- listener.onSaveItems(changesLog);
- }
- }
-
- /**
- * Notify listeners according to isTransaction parameter and is listener transaction aware.
- *
- * @param changesLog - Changes log to notify listeners
- * @param isTransaction - is listeners notified in transaction, or after transaction
- */
- protected void notifySaveItemsOnTransaction(final ItemStateChangesLog changesLog, boolean isTransaction)
- {
- for (MandatoryItemsPersistenceListener mlistener : mandatoryListeners)
- {
- if (mlistener.isTXAware() == isTransaction)
+ if (mlistener.isTXAware() == isListenerTXAware)
mlistener.onSaveItems(changesLog);
}
for (ItemsPersistenceListener listener : listeners)
{
- if (listener.isTXAware() == isTransaction && isListenerAccepted(listener))
+ if (listener.isTXAware() == isListenerTXAware && isListenerAccepted(listener))
listener.onSaveItems(changesLog);
}
}
16 years, 4 months
exo-jcr SVN: r1339 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core and 2 other directories.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-11 06:39:43 -0500 (Mon, 11 Jan 2010)
New Revision: 1339
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-338 lazy load for childs config (2); test workspace ws2 uses all lazy childs
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java 2010-01-11 11:00:15 UTC (rev 1338)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java 2010-01-11 11:39:43 UTC (rev 1339)
@@ -30,7 +30,7 @@
protected String name;
- protected long lazyReadThreshold;
+ protected int lazyReadThreshold;
@Deprecated
protected String autoInitializedRootNt;
@@ -195,12 +195,12 @@
this.initializer = initializer;
}
- public long getLazyReadThreshold()
+ public int getLazyReadThreshold()
{
return lazyReadThreshold;
}
- public void setLazyReadThreshold(long lazyReadThreshold)
+ public void setLazyReadThreshold(int lazyReadThreshold)
{
this.lazyReadThreshold = lazyReadThreshold;
}
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2010-01-11 11:00:15 UTC (rev 1338)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2010-01-11 11:39:43 UTC (rev 1339)
@@ -160,7 +160,7 @@
WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class);
this.lazyReadThreshold =
- wsConfig.getLazyReadThreshold() > 0 ? (int) wsConfig.getLazyReadThreshold() : DEFAULT_LAZY_READ_THRESHOLD;
+ wsConfig.getLazyReadThreshold() > 0 ? wsConfig.getLazyReadThreshold() : DEFAULT_LAZY_READ_THRESHOLD;
WorkspaceFileCleanerHolder cleanerHolder =
(WorkspaceFileCleanerHolder)container.getComponentInstanceOfType(WorkspaceFileCleanerHolder.class);
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml 2010-01-11 11:00:15 UTC (rev 1338)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml 2010-01-11 11:39:43 UTC (rev 1339)
@@ -21,8 +21,8 @@
<mapping name="workspace" class="org.exoplatform.services.jcr.config.WorkspaceEntry">
<value name="name" field="name" style="attribute" />
- <value name="lazy-read-threshold" field="lazyReadThreshold" style="attribute"
- deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseLong" usage="optional" />
+ <value name="lazy-read-threshold" field="lazyReadThreshold"
+ deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseInt" style="attribute" usage="optional" />
<value name="auto-init-root-nodetype" field="autoInitializedRootNt" style="attribute" usage="optional" />
<value name="auto-init-permissions" field="autoInitPermissions" style="attribute" usage="optional" />
<structure name="container" field="container">
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-01-11 11:00:15 UTC (rev 1338)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-01-11 11:39:43 UTC (rev 1339)
@@ -28,7 +28,7 @@
<session-max-age>1h</session-max-age>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
<workspaces>
- <workspace name="ws" lazy-read-threshold="2000">
+ <workspace name="ws">
<!-- for system storage -->
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
@@ -129,7 +129,7 @@
</query-handler>
</workspace>
- <workspace name="ws2">
+ <workspace name="ws2" lazy-read-threshold="1">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr2" />
16 years, 4 months
exo-jcr SVN: r1338 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-11 06:00:15 -0500 (Mon, 11 Jan 2010)
New Revision: 1338
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-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
Log:
EXOJCR-361 : reduce lockAcquisitionTimeout="20000"
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-11 10:54:50 UTC (rev 1337)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-11 11:00:15 UTC (rev 1338)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000" />
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
<clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws">
<!--
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-11 10:54:50 UTC (rev 1337)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-11 11:00:15 UTC (rev 1338)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000" />
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
<clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws1">
<!--
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-11 10:54:50 UTC (rev 1337)
+++ 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-11 11:00:15 UTC (rev 1338)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000" />
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
<!-- Configure the TransactionManager -->
<transaction
transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />
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-11 10:54:50 UTC (rev 1337)
+++ 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-11 11:00:15 UTC (rev 1338)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000" />
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000" />
<!-- Configure the TransactionManager -->
<transaction
transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />
16 years, 4 months
exo-jcr SVN: r1337 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/lock and 7 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-01-11 05:54:50 -0500 (Mon, 11 Jan 2010)
New Revision: 1337
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/ItemsPersistenceListener.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
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/LinkedWorkspaceStorageCacheImpl.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSetProperty.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/MultipleDeserializationTestLoad.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/TesterItemsPersistenceListener.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java
Log:
EXOJCR-376: listeners separated for those that notified in transaction and after that
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/ItemsPersistenceListener.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/ItemsPersistenceListener.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/ItemsPersistenceListener.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -29,9 +29,15 @@
public interface ItemsPersistenceListener
{
/**
- * Will be called wnen data is permanently saved.
+ * Will be called when data is permanently saved.
*
* @param itemStates ItemStateChangesLog
*/
void onSaveItems(ItemStateChangesLog itemStates);
+
+ /**
+ * Return true if listener must be called in transaction, false if not.
+ * @return boolean
+ */
+ boolean isTXAware();
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -799,4 +799,12 @@
{
removeExpired();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/observation/ActionLauncher.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -264,4 +264,12 @@
throw new RepositoryException("Unexpected ItemState for Node " + ItemState.nameFromValue(state.getState()) + " "
+ state.getData().getQPath().getAsString());
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -246,4 +246,11 @@
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -836,4 +836,12 @@
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return false;
+ }
+
}
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-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -202,7 +202,8 @@
transactionManager.begin();
transactionManager.setTransactionTimeout(20);
cache.beginTransaction();
- super.save(changesLog);
+ // save changes and notify only txAware listeners
+ super.saveInTransaction(changesLog);
cache.commitTransaction();
transactionManager.commit();
}
@@ -240,6 +241,8 @@
e.printStackTrace();
throw new RepositoryException(e.getLocalizedMessage(), e.getCause());
}
+ // notify listeners after transaction commit
+ super.postTransactionNotify(changesLog);
}
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -1881,18 +1881,26 @@
public void beginTransaction()
{
// TODO Auto-generated method stub
-
+
}
public void commitTransaction()
{
// TODO Auto-generated method stub
-
+
}
public void rollbackTransaction()
{
// TODO Auto-generated method stub
-
+
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -118,6 +118,41 @@
*/
public void save(final ItemStateChangesLog changesLog) throws RepositoryException
{
+ doSave(changesLog);
+ notifySaveItems(changesLog);
+ }
+
+ /**
+ * Saves the list of changes from this storage. And notifies listeners that are transaction aware.
+ *
+ * @param changesLog
+ * @throws RepositoryException
+ */
+ public void saveInTransaction(final ItemStateChangesLog changesLog) throws RepositoryException
+ {
+ doSave(changesLog);
+ notifySaveItemsOnTransaction(changesLog, true);
+ }
+
+ /**
+ * Notifies listeners that are not transaction aware.
+ * Must be called after transaction commit.
+ *
+ * @param changesLog
+ */
+ public void postTransactionNotify(final ItemStateChangesLog changesLog)
+ {
+ notifySaveItemsOnTransaction(changesLog, false);
+ }
+
+ /**
+ * Save the list of changes to storage.
+ *
+ * @param changesLog
+ * @throws RepositoryException
+ */
+ private void doSave(final ItemStateChangesLog changesLog) throws RepositoryException
+ {
//LOG.info(changesLog.dump())
// check if this workspace container is not read-only
if (readOnly && !(changesLog instanceof ReadOnlyThroughChanges))
@@ -223,8 +258,6 @@
// help to GC
addedNodes.clear();
}
-
- notifySaveItems(changesLog);
}
/**
@@ -290,7 +323,7 @@
con.close();
}
}
-
+
/**
* {@inheritDoc}
*/
@@ -305,7 +338,7 @@
{
con.close();
}
- }
+ }
/**
* {@inheritDoc}
@@ -564,7 +597,7 @@
* @param changesLog
* ItemStateChangesLog
*/
- protected void notifySaveItems(ItemStateChangesLog changesLog)
+ protected void notifySaveItems(final ItemStateChangesLog changesLog)
{
for (MandatoryItemsPersistenceListener mlistener : mandatoryListeners)
mlistener.onSaveItems(changesLog);
@@ -577,6 +610,27 @@
}
/**
+ * Notify listeners according to isTransaction parameter and is listener transaction aware.
+ *
+ * @param changesLog - Changes log to notify listeners
+ * @param isTransaction - is listeners notified in transaction, or after transaction
+ */
+ protected void notifySaveItemsOnTransaction(final ItemStateChangesLog changesLog, boolean isTransaction)
+ {
+ for (MandatoryItemsPersistenceListener mlistener : mandatoryListeners)
+ {
+ if (mlistener.isTXAware() == isTransaction)
+ mlistener.onSaveItems(changesLog);
+ }
+
+ for (ItemsPersistenceListener listener : listeners)
+ {
+ if (listener.isTXAware() == isTransaction && isListenerAccepted(listener))
+ listener.onSaveItems(changesLog);
+ }
+ }
+
+ /**
* Tell if the path is jcr:system descendant.
*
* @param path
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -35,9 +35,7 @@
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
@@ -962,19 +960,26 @@
public void beginTransaction()
{
cache.beginTransaction();
-
+
}
public void commitTransaction()
{
cache.commitTransaction();
-
+
}
public void rollbackTransaction()
{
cache.rollbackTransaction();
-
+
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSetProperty.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSetProperty.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSetProperty.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -395,4 +395,12 @@
{
cLog = (TransactionChangesLog)itemStates;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/MultipleDeserializationTestLoad.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/MultipleDeserializationTestLoad.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/MultipleDeserializationTestLoad.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -96,6 +96,11 @@
{
logsList.clear();
}
+
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
public void testSerialization() throws Exception
@@ -166,4 +171,11 @@
return data;
}
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/TesterItemsPersistenceListener.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/TesterItemsPersistenceListener.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/serialization/TesterItemsPersistenceListener.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -83,4 +83,12 @@
{
logsList.clear();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java 2010-01-11 10:45:53 UTC (rev 1336)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java 2010-01-11 10:54:50 UTC (rev 1337)
@@ -18,16 +18,6 @@
*/
package org.exoplatform.services.jcr.impl.value;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.jcr.Node;
-
import org.exoplatform.services.jcr.BaseStandaloneTest;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
import org.exoplatform.services.jcr.core.WorkspaceContainerFacade;
@@ -40,6 +30,15 @@
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl;
import org.exoplatform.services.jcr.impl.dataflow.serialization.TransactionChangesLogWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jcr.Node;
+
/**
* Created by The eXo Platform SAS.
*
@@ -183,24 +182,35 @@
{
cLog = (TransactionChangesLog)itemStates;
}
-
- private boolean isSpooling(String[] before, String[] after) {
- int newFilecount = 0;
-
- List<String> lBefore = new ArrayList<String>();
- for (String sBefore : before)
- lBefore.add(sBefore);
-
- for (String sAfter : after) {
- if (!lBefore.contains(sAfter)) {
- if (haveValueStorage && newFilecount == 0 || newFilecount == 0)
- newFilecount++;
- else
- return true;
+
+ private boolean isSpooling(String[] before, String[] after)
+ {
+ int newFilecount = 0;
+
+ List<String> lBefore = new ArrayList<String>();
+ for (String sBefore : before)
+ lBefore.add(sBefore);
+
+ for (String sAfter : after)
+ {
+ if (!lBefore.contains(sAfter))
+ {
+ if (haveValueStorage && newFilecount == 0 || newFilecount == 0)
+ newFilecount++;
+ else
+ return true;
+ }
+
}
-
- }
-
- return false;
+
+ return false;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isTXAware()
+ {
+ return true;
+ }
}
16 years, 4 months
exo-jcr SVN: r1336 - 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-11 05:45:53 -0500 (Mon, 11 Jan 2010)
New Revision: 1336
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-361 : reduce time out to 20 sec
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-11 10:16:30 UTC (rev 1335)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-11 10:45:53 UTC (rev 1336)
@@ -198,9 +198,9 @@
{
try
{
-
+
transactionManager.begin();
- transactionManager.setTransactionTimeout(900000);
+ transactionManager.setTransactionTimeout(20);
cache.beginTransaction();
super.save(changesLog);
cache.commitTransaction();
@@ -242,6 +242,7 @@
}
}
}
+
/**
* Start buffering process.
*/
@@ -265,6 +266,7 @@
{
}
+
/**
* Get cached ItemData.
*
16 years, 4 months
exo-jcr SVN: r1335 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-11 05:16:30 -0500 (Mon, 11 Jan 2010)
New Revision: 1335
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java
Log:
EXOJCR-371: CompressedChangesList: REMOVED mustn't be omitted if PUT performed
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java 2010-01-11 09:47:10 UTC (rev 1334)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/CompressedChangesList.java 2010-01-11 10:16:30 UTC (rev 1335)
@@ -87,7 +87,7 @@
while (iter.hasNext())
{
ChangesContainer c = iter.next();
- if (c.getFqn().equals(newChange.getFqn()))
+ if (c.getFqn().equals(newChange.getFqn()) && c.getChangesType()!= ChangesType.REMOVE)
{
iter.remove();
}
16 years, 4 months