[exo-jcr-commits] exo-jcr SVN: r446 - in jcr/branches/1.12.0-JBC/component/core/src: test/resources/conf/standalone and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Oct 29 20:08:52 EDT 2009
Author: pnedonosko
Date: 2009-10-29 20:08:52 -0400 (Thu, 29 Oct 2009)
New Revision: 446
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/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-200: storage connection debug code
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-10-29 21:54:44 UTC (rev 445)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-10-30 00:08:52 UTC (rev 446)
@@ -129,7 +129,7 @@
{
startBatch();
cache.put(makeNodeFqn(data.getQPath()), ITEM_ID, data.getIdentifier());
- cache.put(makeIdFqn(data.getIdentifier()), ITEM_DATA, data);
+ cache.put(makeIdFqn(data.getIdentifier()), ITEM_DATA, data); // treePrint(treeRoot);
}
/**
@@ -192,6 +192,7 @@
NodeData node = (NodeData)cache.get(makeIdFqn(childId), ITEM_DATA);
if (node == null)
{
+ treePrint(treeRoot);
throw new RepositoryException("One of childs is null. Parent " + parent.getQPath().getAsString());
}
childs.add(node);
@@ -200,6 +201,22 @@
return childs;
}
+ private void treePrint(Node<Serializable, Object> node)
+ {
+ for (Node<Serializable, Object> child : node.getChildren())
+ {
+ System.out.println(child.toString());
+ for (Serializable key : child.getKeys())
+ {
+ System.out.println("\t" + key + "=" + child.get(key));
+ }
+ if (!child.isLeaf())
+ {
+ treePrint(child);
+ }
+ }
+ }
+
/**
* {@inheritDoc}
*/
@@ -358,10 +375,15 @@
*/
public void commit() throws IllegalStateException, RepositoryException
{
+ if (LOG.isDebugEnabled())
+ {
+ LOG.debug("commit " + batchStarted);
+ }
+
// end batch
if (batchStarted)
{
- this.cache.endBatch(true);
+ this.cache.endBatch(true); // treePrint(treeRoot);
batchStarted = false;
}
else
@@ -376,6 +398,11 @@
*/
public void rollback() throws IllegalStateException, RepositoryException
{
+ if (LOG.isDebugEnabled())
+ {
+ LOG.debug("rollback " + batchStarted);
+ }
+
// rollback batch
if (batchStarted)
{
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-configuration.xml 2009-10-29 21:54:44 UTC (rev 445)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-configuration.xml 2009-10-30 00:08:52 UTC (rev 446)
@@ -54,18 +54,8 @@
<property name="log4j.appender.file.layout.ConversionPattern"
value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
- <property name="log4j.category.jcr.FileCleaner" value="DEBUG"/>
-
- <!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
- <property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.database.DBSchemaCreator" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspaceDataReplicator" value="DEBUG"/ -->
-
- <!-- property name="log4j.category.jcr.WorkspaceStorageCacheImpl" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.WorkspacePersistentDataManager" value="DEBUG"/ -->
- <!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/ -->
+ <property name="log4j.category.jcr.JBossCacheStorageConnection" value="DEBUG"/>
+ <!-- property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
</properties-param>
<!-- value-param>
More information about the exo-jcr-commits
mailing list