exo-jcr SVN: r868 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-11-25 11:18:09 -0500 (Wed, 25 Nov 2009)
New Revision: 868
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-203 : Fix method JBossCacheStorageConnection.rename()
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 15:27:16 UTC (rev 867)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 16:18:09 UTC (rev 868)
@@ -668,7 +668,7 @@
{
LOG.warn(" Node was updated before " + prevData.getQPath());
}
- else if (!prevParent.removeChild(cNode))
+ else if (!prevParent.removeChild(cNode.getFqn().getLastElement()))
{
throw new RepositoryException("FATAL Node was not removed from list of parent node "
+ prevData.getQPath().getAsString() + ". Node " + data.getQPath().getAsString());
16 years, 7 months
exo-jcr SVN: r867 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-11-25 10:27:16 -0500 (Wed, 25 Nov 2009)
New Revision: 867
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-199: remove perviousData from parent child list updated
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 15:24:48 UTC (rev 866)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 15:27:16 UTC (rev 867)
@@ -657,9 +657,25 @@
}
// remove node form old parent child list
- if (!prevParent
- .removeChild(makeChildNodeFqn(prevData.getQPath().getEntries()[prevData.getQPath().getEntries().length - 1])))
+ // TODO node may me renamed before (using update) so name in list of parent may link to another node
+ // may be there is sence left node without linking in list of parent child nodes. (check it in update)
+ Node<Serializable, Object> cNode =
+ prevParent
+ .getChild(makeChildNodeFqn(prevData.getQPath().getEntries()[prevData.getQPath().getEntries().length - 1]));
+ if (cNode != null)
{
+ if (!((String)cNode.get(ITEM_ID)).equals(prevData.getIdentifier()))
+ {
+ LOG.warn(" Node was updated before " + prevData.getQPath());
+ }
+ else if (!prevParent.removeChild(cNode))
+ {
+ throw new RepositoryException("FATAL Node was not removed from list of parent node "
+ + prevData.getQPath().getAsString() + ". Node " + data.getQPath().getAsString());
+ }
+ }
+ else
+ {
throw new RepositoryException("FATAL Node doesn't listed in children nodes of previous parent "
+ prevData.getQPath().getAsString() + ". Node " + data.getQPath().getAsString());
}
16 years, 7 months
exo-jcr SVN: r866 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 10:24:48 -0500 (Wed, 25 Nov 2009)
New Revision: 866
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
Log:
EXOJCR-262: test fully commented
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:17:49 UTC (rev 865)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:24:48 UTC (rev 866)
@@ -37,7 +37,7 @@
/*
* This test should be performed manually because it requires JCR tearDown and startup without
- * cleaning it's content.
+ * cleaning it's content. BEFORE TESTING UNCOMMENT TEST BODY and TEAR DOWN
*
* To check whether lock-properties are deleted as expected, first run:
* >mvn clean test -Dtest=org.exoplatform.services.jcr.api.lock.TestLockCleanupOnRestart
@@ -49,50 +49,50 @@
public void testLockCleanUp() throws Exception
{
- log.info("/!\\ This test should be executed twice ('mvn clean test "
- + "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
- NodeImpl node;
- try
- {
- node = (NodeImpl)root.getNode(testNodeName);
- log.info("Node \"/LockIt\" found, this is correct SECOND run.");
- }
- catch (PathNotFoundException e)
- {
- node = (NodeImpl)root.addNode(testNodeName);
- node.addMixin("mix:lockable");
- log.info("Node \"/LockIt\" not found, this is probably FIRST run. If not, "
- + "ensure that \"clean\" is not invoked in \"maven test\"!");
- }
- session.save();
- // locking the node with open-scoped deep lock.
- // no exception should be thrown
- try
- {
- node.lock(true, false);
- // ok!
- }
- catch (Exception e)
- {
- fail("Unexpected exception" + e.getStackTrace());
- }
+// log.info("/!\\ This test should be executed twice ('mvn clean test "
+// + "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
+// NodeImpl node;
+// try
+// {
+// node = (NodeImpl)root.getNode(testNodeName);
+// log.info("Node \"/LockIt\" found, this is correct SECOND run.");
+// }
+// catch (PathNotFoundException e)
+// {
+// node = (NodeImpl)root.addNode(testNodeName);
+// node.addMixin("mix:lockable");
+// log.info("Node \"/LockIt\" not found, this is probably FIRST run. If not, "
+// + "ensure that \"clean\" is not invoked in \"maven test\"!");
+// }
+// session.save();
+// // locking the node with open-scoped deep lock.
+// // no exception should be thrown
+// try
+// {
+// node.lock(true, false);
+// // ok!
+// }
+// catch (Exception e)
+// {
+// fail("Unexpected exception" + e.getStackTrace());
+// }
}
- @Override
- protected void tearDown() throws Exception
- {
- // super.tearDown in not invoked to prevent DB cleaning
- // shutdown HSSQLDB :)
- for (Object uri : DatabaseManager.getDatabaseURIs())
- {
- try
- {
- Connection c = DriverManager.getConnection("jdbc:hsqldb:" + uri.toString(), "sa", "");
- c.createStatement().execute("SHUTDOWN");
- }
- catch (Throwable e)
- {
- }
- }
- }
+// @Override
+// protected void tearDown() throws Exception
+// {
+// // super.tearDown in not invoked to prevent DB cleaning
+// // shutdown HSSQLDB :)
+// for (Object uri : DatabaseManager.getDatabaseURIs())
+// {
+// try
+// {
+// Connection c = DriverManager.getConnection("jdbc:hsqldb:" + uri.toString(), "sa", "");
+// c.createStatement().execute("SHUTDOWN");
+// }
+// catch (Throwable e)
+// {
+// }
+// }
+// }
}
16 years, 7 months
exo-jcr SVN: r865 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 10:17:49 -0500 (Wed, 25 Nov 2009)
New Revision: 865
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
Log:
EXOJCR-262: session.logOut - removed.
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:15:04 UTC (rev 864)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:17:49 UTC (rev 865)
@@ -47,7 +47,7 @@
private static String testNodeName = "LockIt";
- public void _testLockCleanUp() throws Exception
+ public void testLockCleanUp() throws Exception
{
log.info("/!\\ This test should be executed twice ('mvn clean test "
+ "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
16 years, 7 months
exo-jcr SVN: r864 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 10:15:04 -0500 (Wed, 25 Nov 2009)
New Revision: 864
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
Log:
EXOJCR-262: test excluded
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 14:56:57 UTC (rev 863)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:15:04 UTC (rev 864)
@@ -47,7 +47,7 @@
private static String testNodeName = "LockIt";
- public void testLockCleanUp() throws Exception
+ public void _testLockCleanUp() throws Exception
{
log.info("/!\\ This test should be executed twice ('mvn clean test "
+ "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
@@ -76,7 +76,6 @@
{
fail("Unexpected exception" + e.getStackTrace());
}
- session.logout();
}
@Override
16 years, 7 months
exo-jcr SVN: r863 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 09:56:57 -0500 (Wed, 25 Nov 2009)
New Revision: 863
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
Log:
EXOJCR-262: Cleanup lock data on startup: refactoring.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2009-11-25 14:53:11 UTC (rev 862)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2009-11-25 14:56:57 UTC (rev 863)
@@ -763,8 +763,8 @@
if (deleteLockValues == null)
{
deleteLockValues = dbConnection.prepareStatement(DELETE_LOCK_VALUES);
- deleteLockValues.setString(1, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKISDEEP.getName());
- deleteLockValues.setString(2, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKOWNER.getName());
+ deleteLockValues.setString(1, Constants.JCR_LOCKISDEEP.getAsString());
+ deleteLockValues.setString(2, Constants.JCR_LOCKOWNER.getAsString());
}
deleteLockValues.executeUpdate();
@@ -773,8 +773,8 @@
if (deleteLockProperties == null)
{
deleteLockProperties = dbConnection.prepareStatement(DELETE_LOCK_PROPERTIES);
- deleteLockProperties.setString(1, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKISDEEP.getName());
- deleteLockProperties.setString(2, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKOWNER.getName());
+ deleteLockProperties.setString(1, Constants.JCR_LOCKISDEEP.getAsString());
+ deleteLockProperties.setString(2, Constants.JCR_LOCKOWNER.getAsString());
}
deleteLockProperties.executeUpdate();
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2009-11-25 14:53:11 UTC (rev 862)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2009-11-25 14:56:57 UTC (rev 863)
@@ -780,8 +780,8 @@
if (deleteLockValues == null)
{
deleteLockValues = dbConnection.prepareStatement(DELETE_LOCK_VALUES);
- deleteLockValues.setString(1, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKISDEEP.getName());
- deleteLockValues.setString(2, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKOWNER.getName());
+ deleteLockValues.setString(1, Constants.JCR_LOCKISDEEP.getAsString());
+ deleteLockValues.setString(2, Constants.JCR_LOCKOWNER.getAsString());
}
deleteLockValues.executeUpdate();
@@ -790,8 +790,8 @@
if (deleteLockProperties == null)
{
deleteLockProperties = dbConnection.prepareStatement(DELETE_LOCK_PROPERTIES);
- deleteLockProperties.setString(1, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKISDEEP.getName());
- deleteLockProperties.setString(2, "[" + Constants.NS_JCR_URI + "]" + Constants.JCR_LOCKOWNER.getName());
+ deleteLockProperties.setString(1, Constants.JCR_LOCKISDEEP.getAsString());
+ deleteLockProperties.setString(2, Constants.JCR_LOCKOWNER.getAsString());
}
deleteLockProperties.executeUpdate();
16 years, 7 months
exo-jcr SVN: r862 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 09:53:11 -0500 (Wed, 25 Nov 2009)
New Revision: 862
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
Log:
EXOJCR-242: (refactoring) LockData is now removed on delete "jcr:lockIsDeep"
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 14:35:01 UTC (rev 861)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 14:53:11 UTC (rev 862)
@@ -25,6 +25,8 @@
import org.exoplatform.services.jcr.dataflow.LockPlainChangesLogImpl;
import org.exoplatform.services.jcr.dataflow.PlainChangesLog;
import org.exoplatform.services.jcr.dataflow.ReadOnlyThroughChanges;
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.lock.LockData;
@@ -40,6 +42,7 @@
import java.util.List;
import java.util.Set;
+import javax.jcr.InvalidItemStateException;
import javax.jcr.RepositoryException;
/**
@@ -200,10 +203,6 @@
else if (itemState.isDeleted())
{
doDelete(data, conn);
- if (!data.isNode() & data.getQName().equals(Constants.JCR_LOCKISDEEP))
- {
- conn.removeLockData(data.getIdentifier());
- }
}
else if (itemState.isRenamed())
{
@@ -238,6 +237,26 @@
notifySaveItems(changesLog);
}
+ @Override
+ protected void doDelete(TransientItemData item, WorkspaceStorageConnection con) throws RepositoryException,
+ InvalidItemStateException
+ {
+ if (item.isNode())
+ {
+ con.delete((NodeData)item);
+ }
+ else
+ {
+ con.delete((PropertyData)item);
+ // if property JCR:LOCKISDEEP is removed then remove lockData also.
+ // This is the case, when locked node is deleted
+ if (item.getQName().equals(Constants.JCR_LOCKISDEEP))
+ {
+ con.removeLockData(item.getIdentifier());
+ }
+ }
+ }
+
/**
* Tell if the path is jcr:system descendant.
*
16 years, 7 months
exo-jcr SVN: r861 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 09:35:01 -0500 (Wed, 25 Nov 2009)
New Revision: 861
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
Log:
EXOJCR-242: LockData removing logic changed. LockData is now removed on delete "jcr:lockIsDeep"
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 14:05:17 UTC (rev 860)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 14:35:01 UTC (rev 861)
@@ -45,8 +45,6 @@
/**
* Created by The eXo Platform SAS.
*
- * Extends WorkspacePersistentDataManager, providing ability for storing lockData.
- *
* <br/>Date: 23.10.2009
*
* @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter Nedonosko</a>
@@ -56,7 +54,7 @@
{
/**
- * JBossCacheWorkspaceDataManager constructor.
+ * JBossCachePersistentDataManager constructor.
*
* @param dataContainer WorkspaceDataContainer
* @param systemDataContainerHolder SystemDataContainerHolder
@@ -67,9 +65,6 @@
super(dataContainer, systemDataContainerHolder);
}
- /**
- * @see org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager#save(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog)
- */
@Override
public void save(ItemStateChangesLog changesLog) throws RepositoryException
{
@@ -81,7 +76,6 @@
WorkspaceStorageConnection thisConnection = null;
WorkspaceStorageConnection systemConnection = null;
- List<String> removeLocksList = new ArrayList<String>();
// prepare changes log list
List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
@@ -198,22 +192,22 @@
if (itemState.isAdded())
{
doAdd(data, conn, addedNodes);
- removeLocksList.remove(data.getIdentifier());
}
else if (itemState.isUpdated())
{
doUpdate(data, conn);
- removeLocksList.remove(data.getIdentifier());
}
else if (itemState.isDeleted())
{
doDelete(data, conn);
- removeLocksList.add(data.getIdentifier());
+ if (!data.isNode() & data.getQName().equals(Constants.JCR_LOCKISDEEP))
+ {
+ conn.removeLockData(data.getIdentifier());
+ }
}
else if (itemState.isRenamed())
{
doRename(data, conn, addedNodes);
- removeLocksList.remove(data.getIdentifier());
}
else if (itemState.isMixinChanged())
{
@@ -225,11 +219,6 @@
+ "ms, " + data.getQPath().getAsString());
}
}
- // cleanup lockData for removed nodes
- for (String identifier : removeLocksList)
- {
- thisConnection.removeLockData(identifier);
- }
if (thisConnection != null)
thisConnection.commit();
if (systemConnection != null && !systemConnection.equals(thisConnection))
@@ -261,4 +250,4 @@
return path.isDescendantOf(Constants.JCR_SYSTEM_PATH) || path.equals(Constants.JCR_SYSTEM_PATH);
}
-}
+}
\ No newline at end of file
16 years, 7 months
exo-jcr SVN: r860 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-25 09:05:17 -0500 (Wed, 25 Nov 2009)
New Revision: 860
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
Log:
EXOJCR-242: Added only javadoc comment for class
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 13:55:15 UTC (rev 859)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/JBossCacheWorkspaceDataManager.java 2009-11-25 14:05:17 UTC (rev 860)
@@ -45,6 +45,8 @@
/**
* Created by The eXo Platform SAS.
*
+ * Extends WorkspacePersistentDataManager, providing ability for storing lockData.
+ *
* <br/>Date: 23.10.2009
*
* @author <a href="mailto:peter.nedonosko@exoplatform.com.ua">Peter Nedonosko</a>
@@ -54,7 +56,7 @@
{
/**
- * JBossCachePersistentDataManager constructor.
+ * JBossCacheWorkspaceDataManager constructor.
*
* @param dataContainer WorkspaceDataContainer
* @param systemDataContainerHolder SystemDataContainerHolder
@@ -65,6 +67,9 @@
super(dataContainer, systemDataContainerHolder);
}
+ /**
+ * @see org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager#save(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog)
+ */
@Override
public void save(ItemStateChangesLog changesLog) throws RepositoryException
{
@@ -220,6 +225,7 @@
+ "ms, " + data.getQPath().getAsString());
}
}
+ // cleanup lockData for removed nodes
for (String identifier : removeLocksList)
{
thisConnection.removeLockData(identifier);
16 years, 7 months
exo-jcr SVN: r859 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-11-25 08:55:15 -0500 (Wed, 25 Nov 2009)
New Revision: 859
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-199: updated(NodeData) - orderBefore check added
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 13:08:18 UTC (rev 858)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-25 13:55:15 UTC (rev 859)
@@ -885,6 +885,14 @@
// update in NODES
node.put(ITEM_DATA, data);
+
+ int currentDataIndex = data.getQPath().getEntries()[data.getQPath().getEntries().length - 1].getIndex();
+ int previousDataIndex = prevData.getQPath().getEntries()[data.getQPath().getEntries().length - 1].getIndex();
+ if (currentDataIndex != previousDataIndex)
+ {
+ // do update qpath of child nodes and properties
+ updateTreePath(node, data.getQPath());
+ }
}
/**
16 years, 7 months