exo-jcr SVN: r5848 - jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other.
by do-not-reply@jboss.org
Author: andrew.plotnikov
Date: 2012-03-12 11:05:14 -0400 (Mon, 12 Mar 2012)
New Revision: 5848
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer1.JPG
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer2.JPG
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer3.JPG
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer4.JPG
Log:
EXOJCR-1798: Updated screenshots
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer1.JPG
===================================================================
(Binary files differ)
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer2.JPG
===================================================================
(Binary files differ)
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer3.JPG
===================================================================
(Binary files differ)
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/resources/images/other/lnkproducer4.JPG
===================================================================
(Binary files differ)
14 years, 1 month
exo-jcr SVN: r5847 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-12 10:55:42 -0400 (Mon, 12 Mar 2012)
New Revision: 5847
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
Log:
EXOJCR-1803 : changing default value of index initial retrieve
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2012-03-12 14:53:13 UTC (rev 5846)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2012-03-12 14:55:42 UTC (rev 5847)
@@ -515,7 +515,7 @@
/**
* The way to create initial index..
*/
- private String indexRecoveryMode = INDEX_RECOVERY_MODE_FROM_INDEXING;
+ private String indexRecoveryMode = INDEX_RECOVERY_MODE_FROM_COORDINATOR;
/**
* Defines reindexing synchronization policy. Whether or not start it asynchronously
14 years, 1 month
exo-jcr SVN: r5846 - jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2012-03-12 10:53:13 -0400 (Mon, 12 Mar 2012)
New Revision: 5846
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
Log:
EXOJCR-1803 : changing default value of index initial retrieve
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2012-03-12 14:23:29 UTC (rev 5845)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2012-03-12 14:53:13 UTC (rev 5846)
@@ -508,7 +508,7 @@
/**
* The way to create initial index..
*/
- private String indexRecoveryMode = INDEX_RECOVERY_MODE_FROM_INDEXING;
+ private String indexRecoveryMode = INDEX_RECOVERY_MODE_FROM_COORDINATOR;
/**
* Defines reindexing synchronization policy. Whether or not start it asynchronously
14 years, 1 month
exo-jcr SVN: r5845 - jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2012-03-12 10:23:29 -0400 (Mon, 12 Mar 2012)
New Revision: 5845
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-1758 : The problem with eviction and stoping cache on repository stop was fixed.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:20:30 UTC (rev 5844)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:23:29 UTC (rev 5845)
@@ -509,10 +509,18 @@
if (shareable)
{
- // The cache cannot be stopped since it can be shared so we evict the root node instead
- cache.getNode(lockRoot).setResident(false);
- cache.evict(lockRoot, true);
- cache.getRegion(lockRoot, false).processEvictionQueues();
+ // The cache cannot be stopped since it can be shared so we remove the root node instead
+ try
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(true);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
+ cache.removeNode(lockRoot);
+ }
+ finally
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(false);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
+ }
}
try
14 years, 1 month
exo-jcr SVN: r5844 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2012-03-12 10:20:30 -0400 (Mon, 12 Mar 2012)
New Revision: 5844
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-1758 : The problem with eviction and stoping cache on repository stop was fixed.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:19:33 UTC (rev 5843)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2012-03-12 14:20:30 UTC (rev 5844)
@@ -33,8 +33,8 @@
import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory.CacheType;
-import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
@@ -509,10 +509,18 @@
if (shareable)
{
- // The cache cannot be stopped since it can be shared so we evict the root node instead
- cache.getNode(lockRoot).setResident(false);
- cache.evict(lockRoot, true);
- cache.getRegion(lockRoot, false).processEvictionQueues();
+ // The cache cannot be stopped since it can be shared so we remove the root node instead
+ try
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(true);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
+ cache.removeNode(lockRoot);
+ }
+ finally
+ {
+ cache.getInvocationContext().getOptionOverrides().setSuppressPersistence(false);
+ cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
+ }
}
try
14 years, 1 month
exo-jcr SVN: r5843 - jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-03-12 10:19:33 -0400 (Mon, 12 Mar 2012)
New Revision: 5843
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainerChecker.java
Log:
EXOJCR-1773: adopted RepositoryCheckController to new table names
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainerChecker.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainerChecker.java 2012-03-12 12:51:13 UTC (rev 5842)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainerChecker.java 2012-03-12 14:19:33 UTC (rev 5843)
@@ -40,6 +40,7 @@
import org.exoplatform.services.jcr.impl.core.lock.LockTableHandler;
import org.exoplatform.services.jcr.impl.core.lock.LockTableHandlerFactory;
import org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeDataManagerImpl;
+import org.exoplatform.services.jcr.impl.storage.jdbc.JDBCDataContainerConfig.DatabaseStructureType;
import org.exoplatform.services.jcr.impl.storage.value.ValueDataNotFoundException;
import org.exoplatform.services.jcr.impl.storage.value.ValueStorageNotFoundException;
import org.exoplatform.services.jcr.storage.WorkspaceStorageConnection;
@@ -471,61 +472,68 @@
private void initInspectionQueries()
{
+ String itemTableSuffix = getItemTableSuffix(jdbcDataContainer.containerConfig.dbStructureType);
+ String valueTableSuffix = getValueTableSuffix(jdbcDataContainer.containerConfig.dbStructureType);
+ String referenceTableSuffix = getReferenceTableSuffix(jdbcDataContainer.containerConfig.dbStructureType);
+
+ boolean singleDatabase =
+ jdbcDataContainer.containerConfig.dbStructureType == JDBCDataContainerConfig.DatabaseStructureType.SINGLE;
+
vsInspectionQuery =
- new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select PROPERTY_ID, ORDER_NUM, STORAGE_DESC from JCR_MVALUE where STORAGE_DESC is not null"
- : "select V.PROPERTY_ID, V.ORDER_NUM, V.STORAGE_DESC from JCR_SVALUE V, JCR_SITEM I"
- + " where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
- + "' and V.PROPERTY_ID = I.ID and STORAGE_DESC is not null", new String[]{
+ new InspectionQuery(singleDatabase ? "select V.PROPERTY_ID, V.ORDER_NUM, V.STORAGE_DESC from JCR_"
+ + valueTableSuffix + " V, JCR_" + itemTableSuffix + " I" + " where I.CONTAINER_NAME='"
+ + jdbcDataContainer.containerConfig.containerName
+ + "' and V.PROPERTY_ID = I.ID and STORAGE_DESC is not null"
+ : "select PROPERTY_ID, ORDER_NUM, STORAGE_DESC from JCR_" + valueTableSuffix
+ + " where STORAGE_DESC is not null", new String[]{
DBConstants.COLUMN_VPROPERTY_ID, DBConstants.COLUMN_VORDERNUM, DBConstants.COLUMN_VSTORAGE_DESC},
"Items with value data stored in value storage", new DummyRepair());
lockInspectionQuery =
- new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select distinct PARENT_ID from JCR_MITEM where I_CLASS=2 AND"
- + " (NAME='[http://www.jcp.org/jcr/1.0]lockOwner' OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')"
- : "select distinct PARENT_ID from JCR_SITEM WHERE CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName + "'"
- + " AND I_CLASS=2 and (NAME='[http://www.jcp.org/jcr/1.0]lockOwner'"
- + " OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')", new String[]{DBConstants.COLUMN_PARENTID},
- "Items which have jcr:lockOwner and jcr:lockIsDeep properties", new DummyRepair());
+ new InspectionQuery(singleDatabase ? "select distinct PARENT_ID from JCR_" + itemTableSuffix
+ + " WHERE CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName + "'"
+ + " AND I_CLASS=2 and (NAME='[http://www.jcp.org/jcr/1.0]lockOwner'"
+ + " OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')" : "select distinct PARENT_ID from JCR_"
+ + itemTableSuffix + " where I_CLASS=2 AND"
+ + " (NAME='[http://www.jcp.org/jcr/1.0]lockOwner' OR NAME='[http://www.jcp.org/jcr/1.0]lockIsDeep')",
+ new String[]{DBConstants.COLUMN_PARENTID}, "Items which have jcr:lockOwner and jcr:lockIsDeep properties",
+ new DummyRepair());
// ITEM tables
- itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM I where NOT EXISTS(select * from JCR_MITEM P where P.ID = I.PARENT_ID)"
- : "select * from JCR_SITEM I where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
- + "' and NOT EXISTS(select * from JCR_SITEM P where P.ID = I.PARENT_ID)", new String[]{
- DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME, DBConstants.COLUMN_CLASS},
- "Items that do not have parent nodes", new RootAsParentAssigner(jdbcDataContainer.getConnectionFactory())));
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + itemTableSuffix
+ + " I where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
+ + "' and NOT EXISTS(select * from JCR_" + itemTableSuffix + " P where P.ID = I.PARENT_ID)"
+ : "select * from JCR_" + itemTableSuffix + " I where NOT EXISTS(select * from JCR_" + itemTableSuffix
+ + " P where P.ID = I.PARENT_ID)", new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID,
+ DBConstants.COLUMN_NAME, DBConstants.COLUMN_CLASS}, "Items that do not have parent nodes",
+ new RootAsParentAssigner(jdbcDataContainer.getConnectionFactory())));
- itemsInspectionQuery
- .add(new InspectionQueryFilteredMultivaluedProperties(
- jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM P where P.I_CLASS=2 and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_MVALUE V "
- + "where V.PROPERTY_ID=P.ID)" : "select * from JCR_SITEM P where P.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName + "' and P.I_CLASS=2"
- + " and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_SVALUE V where V.PROPERTY_ID=P.ID)",
- new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
- "A node that has a single valued properties with nothing declared in the VALUE table.",
- new PropertyRemover(jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));
+ itemsInspectionQuery.add(new InspectionQueryFilteredMultivaluedProperties(singleDatabase ? "select * from JCR_"
+ + itemTableSuffix + " P where P.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
+ + "' and P.I_CLASS=2" + " and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_" + valueTableSuffix
+ + " V where V.PROPERTY_ID=P.ID)" : "select * from JCR_" + itemTableSuffix
+ + " P where P.I_CLASS=2 and P.P_MULTIVALUED=? and NOT EXISTS( select * from JCR_" + valueTableSuffix + " V "
+ + "where V.PROPERTY_ID=P.ID)", new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID,
+ DBConstants.COLUMN_NAME},
+ "A node that has a single valued properties with nothing declared in the VALUE table.", new PropertyRemover(
+ jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));
- itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM N where N.I_CLASS=1 and NOT EXISTS "
- + "(select * from JCR_MITEM P where P.I_CLASS=2 and P.PARENT_ID=N.ID "
- + "and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType')"
- : "select * from JCR_SITEM N where N.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
- + "' and N.I_CLASS=1 and NOT EXISTS (select * from JCR_SITEM P "
- + "where P.I_CLASS=2 and P.PARENT_ID=N.ID and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' "
- + "and P.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName + "')", new String[]{
- DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + itemTableSuffix
+ + " N where N.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
+ + "' and N.I_CLASS=1 and NOT EXISTS (select * from JCR_" + itemTableSuffix + " P "
+ + "where P.I_CLASS=2 and P.PARENT_ID=N.ID and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType' "
+ + "and P.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName + "')" : "select * from JCR_"
+ + itemTableSuffix + " N where N.I_CLASS=1 and NOT EXISTS " + "(select * from JCR_" + itemTableSuffix
+ + " P where P.I_CLASS=2 and P.PARENT_ID=N.ID " + "and P.NAME='[http://www.jcp.org/jcr/1.0]primaryType')",
+ new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
"A node that doesn't have primary type property", new NodeRemover(jdbcDataContainer.getConnectionFactory(),
nodeTypeManager)));
- itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MVALUE V where NOT EXISTS(select * from JCR_MITEM P "
- + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)"
- : "select * from JCR_SVALUE V where NOT EXISTS(select * from JCR_SITEM P "
- + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)", new String[]{DBConstants.COLUMN_ID,
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + valueTableSuffix
+ + " V where NOT EXISTS(select * from JCR_" + itemTableSuffix + " P "
+ + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)" : "select * from JCR_" + valueTableSuffix
+ + " V where NOT EXISTS(select * from JCR_" + itemTableSuffix + " P "
+ + "where V.PROPERTY_ID = P.ID and P.I_CLASS=2)", new String[]{DBConstants.COLUMN_ID,
DBConstants.COLUMN_VPROPERTY_ID}, "All value records that has not related property record",
new ValueRecordsRemover(jdbcDataContainer.getConnectionFactory(),
jdbcDataContainer.containerConfig.containerName, jdbcDataContainer.containerConfig.multiDb)));
@@ -535,64 +543,107 @@
if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_SYBASE))
{
statement =
- jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and not DATA like null)"
- : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName
- + "' AND ((STORAGE_DESC is not null and not DATA like null))";
+ singleDatabase ? "select V.* from JCR_" + valueTableSuffix + " V, JCR_" + itemTableSuffix
+ + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
+ + jdbcDataContainer.containerConfig.containerName
+ + "' AND ((STORAGE_DESC is not null and not DATA like null))" : "select * from JCR_" + valueTableSuffix
+ + " where (STORAGE_DESC is not null and not DATA like null)";
}
else if (jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLE)
|| jdbcDataContainer.containerConfig.dbDialect.equalsIgnoreCase(DBConstants.DB_DIALECT_ORACLEOCI))
{
statement =
- jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
- : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName
- + "' AND (STORAGE_DESC is not null and DATA is not null)";
+ singleDatabase ? "select V.* from JCR_" + valueTableSuffix + " V, JCR_" + itemTableSuffix
+ + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
+ + jdbcDataContainer.containerConfig.containerName
+ + "' AND (STORAGE_DESC is not null and DATA is not null)" : "select * from JCR_" + valueTableSuffix
+ + " where (STORAGE_DESC is not null and DATA is not null)";
}
else
{
statement =
- jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MVALUE where (STORAGE_DESC is not null and DATA is not null)"
- : "select V.* from JCR_SVALUE V, JCR_SITEM I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName
- + "' AND ((STORAGE_DESC is not null and DATA is not null))";
+ singleDatabase ? "select V.* from JCR_" + valueTableSuffix + " V, JCR_" + itemTableSuffix
+ + " I where V.PROPERTY_ID = I.ID and I.CONTAINER_NAME='"
+ + jdbcDataContainer.containerConfig.containerName
+ + "' AND ((STORAGE_DESC is not null and DATA is not null))" : "select * from JCR_" + valueTableSuffix
+ + " where (STORAGE_DESC is not null and DATA is not null)";
}
itemsInspectionQuery.add(new InspectionQuery(statement, new String[]{DBConstants.COLUMN_ID},
"Incorrect VALUE records. Both fields STORAGE_DESC and DATA contain not null value.", new DummyRepair()));
- itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM I where I.ID = I.PARENT_ID and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'"
- : "select * from JCR_SITEM I where I.ID = I.PARENT_ID and I.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName + "' and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'",
- new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
- "An item is its own parent.", new RootAsParentAssigner(jdbcDataContainer.getConnectionFactory())));
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + itemTableSuffix
+ + " I where I.ID = I.PARENT_ID and I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
+ + "' and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'" : "select * from JCR_" + itemTableSuffix
+ + " I where I.ID = I.PARENT_ID and I.NAME <> '" + Constants.ROOT_PARENT_NAME + "'", new String[]{
+ DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME}, "An item is its own parent.",
+ new RootAsParentAssigner(jdbcDataContainer.getConnectionFactory())));
- itemsInspectionQuery
- .add(new InspectionQuery(
- jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM I where EXISTS (select * from JCR_MITEM J"
- + " WHERE I.PARENT_ID = J.PARENT_ID AND I.NAME = J.NAME and I.I_INDEX = J.I_INDEX and I.I_CLASS = J.I_CLASS"
- + " and I.VERSION != J.VERSION)"
- : "select * from JCR_SITEM I where I.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName
- + "' and EXISTS (select * from JCR_SITEM J WHERE I.CONTAINER_NAME = J.CONTAINER_NAME and"
- + " I.PARENT_ID = J.PARENT_ID AND I.NAME = J.NAME and I.I_INDEX = J.I_INDEX and I.I_CLASS = J.I_CLASS"
- + " and I.VERSION != J.VERSION)",
- new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME,
- DBConstants.COLUMN_VERSION, DBConstants.COLUMN_CLASS, DBConstants.COLUMN_INDEX},
- "Several versions of same item.", new EarlierVersionsRemover(jdbcDataContainer.getConnectionFactory())));
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + itemTableSuffix
+ + " I where I.CONTAINER_NAME='" + jdbcDataContainer.containerConfig.containerName
+ + "' and EXISTS (select * from JCR_" + itemTableSuffix + " J WHERE I.CONTAINER_NAME = J.CONTAINER_NAME and"
+ + " I.PARENT_ID = J.PARENT_ID AND I.NAME = J.NAME and I.I_INDEX = J.I_INDEX and I.I_CLASS = J.I_CLASS"
+ + " and I.VERSION != J.VERSION)" : "select * from JCR_" + itemTableSuffix
+ + " I where EXISTS (select * from JCR_" + itemTableSuffix + " J"
+ + " WHERE I.PARENT_ID = J.PARENT_ID AND I.NAME = J.NAME and I.I_INDEX = J.I_INDEX and I.I_CLASS = J.I_CLASS"
+ + " and I.VERSION != J.VERSION)", new String[]{DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID,
+ DBConstants.COLUMN_NAME, DBConstants.COLUMN_VERSION, DBConstants.COLUMN_CLASS, DBConstants.COLUMN_INDEX},
+ "Several versions of same item.", new EarlierVersionsRemover(jdbcDataContainer.getConnectionFactory())));
- itemsInspectionQuery.add(new InspectionQuery(jdbcDataContainer.containerConfig.multiDb
- ? "select * from JCR_MITEM P, JCR_MVALUE V where P.ID=V.PROPERTY_ID and P.P_TYPE=9 and NOT EXISTS "
- + "(select * from JCR_MREF R where P.ID=R.PROPERTY_ID)"
- : "select * from JCR_SITEM P, JCR_SVALUE V where P.ID=V.PROPERTY_ID and P.CONTAINER_NAME='"
- + jdbcDataContainer.containerConfig.containerName
- + "' and P.P_TYPE=9 and NOT EXISTS (select * from JCR_SREF R where P.ID=R.PROPERTY_ID)", new String[]{
- DBConstants.COLUMN_ID, DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME},
- "Reference properties without reference records", new PropertyRemover(
- jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));
+ itemsInspectionQuery.add(new InspectionQuery(singleDatabase ? "select * from JCR_" + itemTableSuffix + " P, JCR_"
+ + valueTableSuffix + " V where P.ID=V.PROPERTY_ID and P.CONTAINER_NAME='"
+ + jdbcDataContainer.containerConfig.containerName + "' and P.P_TYPE=9 and NOT EXISTS (select * from JCR_"
+ + referenceTableSuffix + " R where P.ID=R.PROPERTY_ID)" : "select * from JCR_" + itemTableSuffix + " P, JCR_"
+ + valueTableSuffix + " V where P.ID=V.PROPERTY_ID and P.P_TYPE=9 and NOT EXISTS " + "(select * from JCR_"
+ + referenceTableSuffix + " R where P.ID=R.PROPERTY_ID)", new String[]{DBConstants.COLUMN_ID,
+ DBConstants.COLUMN_PARENTID, DBConstants.COLUMN_NAME}, "Reference properties without reference records",
+ new PropertyRemover(jdbcDataContainer.getConnectionFactory(), nodeTypeManager)));
}
+
+ private String getItemTableSuffix(DatabaseStructureType dbStructureType)
+ {
+ if (dbStructureType == DatabaseStructureType.MULTI)
+ {
+ return "MITEM";
+ }
+ else if (dbStructureType == DatabaseStructureType.SINGLE)
+ {
+ return "SITEM";
+ }
+ else
+ {
+ return "I" + jdbcDataContainer.containerConfig.dbTableSuffix;
+ }
+ }
+
+ private String getValueTableSuffix(DatabaseStructureType dbStructureType)
+ {
+ if (dbStructureType == DatabaseStructureType.MULTI)
+ {
+ return "MVALUE";
+ }
+ else if (dbStructureType == DatabaseStructureType.SINGLE)
+ {
+ return "SVALUE";
+ }
+ else
+ {
+ return "V" + jdbcDataContainer.containerConfig.dbTableSuffix;
+ }
+ }
+
+ private String getReferenceTableSuffix(DatabaseStructureType dbStructureType)
+ {
+ if (dbStructureType == DatabaseStructureType.MULTI)
+ {
+ return "MREF";
+ }
+ else if (dbStructureType == DatabaseStructureType.SINGLE)
+ {
+ return "SREF";
+ }
+ else
+ {
+ return "R" + jdbcDataContainer.containerConfig.dbTableSuffix;
+ }
+ }
}
14 years, 1 month
exo-jcr SVN: r5842 - in jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc: db and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-12 08:51:13 -0400 (Mon, 12 Mar 2012)
New Revision: 5842
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
Log:
EXOJCR-1762: auto-repair, remove unnecessary query
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-03-12 12:51:13 UTC (rev 5842)
@@ -24,7 +24,17 @@
import org.exoplatform.services.jcr.dataflow.ItemState;
import org.exoplatform.services.jcr.dataflow.persistent.PersistedNodeData;
import org.exoplatform.services.jcr.dataflow.persistent.PersistedPropertyData;
-import org.exoplatform.services.jcr.datamodel.*;
+import org.exoplatform.services.jcr.datamodel.IllegalACLException;
+import org.exoplatform.services.jcr.datamodel.IllegalNameException;
+import org.exoplatform.services.jcr.datamodel.InternalQName;
+import org.exoplatform.services.jcr.datamodel.ItemData;
+import org.exoplatform.services.jcr.datamodel.ItemType;
+import org.exoplatform.services.jcr.datamodel.NodeData;
+import org.exoplatform.services.jcr.datamodel.NodeDataIndexing;
+import org.exoplatform.services.jcr.datamodel.PropertyData;
+import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter;
import org.exoplatform.services.jcr.impl.dataflow.persistent.ACLHolder;
@@ -2865,12 +2875,6 @@
*/
protected abstract void deleteLockProperties() throws SQLException;
- /**
- * Deletes [http://www.jcp.org/jcr/1.0]lockOwner and [http://www.jcp.org/jcr/1.0]lockIsDeep
- * properties directly from DB for specific parent.
- */
- protected abstract void deleteLockProperties(String nodeIdentifier) throws SQLException;
-
protected abstract ResultSet findReferences(String nodeIdentifier) throws SQLException;
protected abstract int deleteItemByIdentifier(String identifier) throws SQLException;
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-03-12 12:51:13 UTC (rev 5842)
@@ -700,60 +700,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM " + JCR_VALUE + " WHERE PROPERTY_ID IN" + " (SELECT ID FROM "
- + JCR_ITEM + " WHERE PARENT_ID=? AND" + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM " + JCR_ITEM + " WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
-
- removeValuesStatement.setString(1, getInternalId(nodeIdentifier));
- removeItemsStatement.setString(1, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-03-12 12:51:13 UTC (rev 5842)
@@ -716,63 +716,8 @@
}
/**
- * {@inheritDoc}
- */
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SVALUE WHERE PROPERTY_ID IN (SELECT ID FROM JCR_SITEM"
- + " WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
- removeValuesStatement.setString(1, containerConfig.containerName);
- removeValuesStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SITEM WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
- removeItemsStatement.setString(1, containerConfig.containerName);
- removeItemsStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
+ * {@inheritDoc}
+ */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-03-12 12:51:13 UTC (rev 5842)
@@ -1088,60 +1088,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM " + JCR_VALUE + " WHERE PROPERTY_ID IN" + " (SELECT ID FROM "
- + JCR_ITEM + " WHERE PARENT_ID=? AND" + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM " + JCR_ITEM + " WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
-
- removeValuesStatement.setString(1, getInternalId(nodeIdentifier));
- removeItemsStatement.setString(1, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
@Override
protected ResultSet findNodesCount() throws SQLException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-03-12 12:51:13 UTC (rev 5842)
@@ -1132,61 +1132,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SVALUE WHERE PROPERTY_ID IN (SELECT ID FROM JCR_SITEM"
- + " WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
- removeValuesStatement.setString(1, containerConfig.containerName);
- removeValuesStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SITEM WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
- removeItemsStatement.setString(1, containerConfig.containerName);
- removeItemsStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
14 years, 1 month
exo-jcr SVN: r5841 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc: db and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-12 08:49:32 -0400 (Mon, 12 Mar 2012)
New Revision: 5841
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
Log:
EXOJCR-1762: auto-repair, remove unnecessary query
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-03-12 12:45:05 UTC (rev 5840)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
@@ -2813,12 +2813,6 @@
*/
protected abstract void deleteLockProperties() throws SQLException;
- /**
- * Deletes [http://www.jcp.org/jcr/1.0]lockOwner and [http://www.jcp.org/jcr/1.0]lockIsDeep
- * properties directly from DB for specific parent.
- */
- protected abstract void deleteLockProperties(String nodeIdentifier) throws SQLException;
-
protected abstract ResultSet findReferences(String nodeIdentifier) throws SQLException;
protected abstract int deleteItemByIdentifier(String identifier) throws SQLException;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-03-12 12:45:05 UTC (rev 5840)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
@@ -609,61 +609,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_MVALUE WHERE PROPERTY_ID IN"
- + " (SELECT ID FROM JCR_MITEM WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_MITEM WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
-
- removeValuesStatement.setString(1, getInternalId(nodeIdentifier));
- removeItemsStatement.setString(1, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-03-12 12:45:05 UTC (rev 5840)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
@@ -635,61 +635,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SVALUE WHERE PROPERTY_ID IN (SELECT ID FROM JCR_SITEM"
- + " WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
- removeValuesStatement.setString(1, containerName);
- removeValuesStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SITEM WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
- removeItemsStatement.setString(1, containerName);
- removeItemsStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-03-12 12:45:05 UTC (rev 5840)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
@@ -1090,61 +1090,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_MVALUE WHERE PROPERTY_ID IN"
- + " (SELECT ID FROM JCR_MITEM WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_MITEM WHERE PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
-
- removeValuesStatement.setString(1, getInternalId(nodeIdentifier));
- removeItemsStatement.setString(1, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-03-12 12:45:05 UTC (rev 5840)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java 2012-03-12 12:49:32 UTC (rev 5841)
@@ -1014,61 +1014,6 @@
/**
* {@inheritDoc}
*/
- protected void deleteLockProperties(String nodeIdentifier) throws SQLException
- {
- PreparedStatement removeValuesStatement = null;
- PreparedStatement removeItemsStatement = null;
-
- try
- {
- removeValuesStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SVALUE WHERE PROPERTY_ID IN (SELECT ID FROM JCR_SITEM"
- + " WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner'))");
- removeValuesStatement.setString(1, containerName);
- removeValuesStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeItemsStatement =
- dbConnection.prepareStatement("DELETE FROM JCR_SITEM WHERE CONTAINER_NAME = ? AND PARENT_ID=? AND"
- + " (NAME = '[http://www.jcp.org/jcr/1.0]lockIsDeep' OR"
- + " NAME = '[http://www.jcp.org/jcr/1.0]lockOwner')");
- removeItemsStatement.setString(1, containerName);
- removeItemsStatement.setString(2, getInternalId(nodeIdentifier));
-
- removeValuesStatement.executeUpdate();
- removeItemsStatement.executeUpdate();
- }
- finally
- {
- if (removeValuesStatement != null)
- {
- try
- {
- removeValuesStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
-
- if (removeItemsStatement != null)
- {
- try
- {
- removeItemsStatement.close();
- }
- catch (SQLException e)
- {
- LOG.error("Can't close statement", e);
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
protected ResultSet findMaxPropertyVersion(String parentId, String name, int index) throws SQLException
{
if (findMaxPropertyVersions == null)
14 years, 1 month
exo-jcr SVN: r5840 - jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-12 08:45:05 -0400 (Mon, 12 Mar 2012)
New Revision: 5840
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
Log:
EXOJCR-1783: stopping shareable JBC, fix java.util.ConcurrentModificationException
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-03-12 12:44:35 UTC (rev 5839)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-03-12 12:45:05 UTC (rev 5840)
@@ -45,6 +45,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
import javax.management.ObjectName;
import javax.transaction.TransactionManager;
@@ -283,7 +284,7 @@
Map<ConfigurationKey, CacheInstance> caches = allCacheTypes.get(cacheType);
if (caches == null)
{
- caches = new HashMap<ConfigurationKey, CacheInstance>();
+ caches = new ConcurrentHashMap<ConfigurationKey, CacheInstance>();
allCacheTypes.put(cacheType, caches);
}
Configuration cfg = cache.getConfiguration();
14 years, 1 month
exo-jcr SVN: r5839 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-03-12 08:44:35 -0400 (Mon, 12 Mar 2012)
New Revision: 5839
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
Log:
EXOJCR-1783: stopping shareable JBC, fix java.util.ConcurrentModificationException
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-03-12 11:15:29 UTC (rev 5838)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2012-03-12 12:44:35 UTC (rev 5839)
@@ -45,6 +45,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
import javax.management.ObjectName;
import javax.transaction.TransactionManager;
@@ -283,7 +284,7 @@
Map<ConfigurationKey, CacheInstance> caches = allCacheTypes.get(cacheType);
if (caches == null)
{
- caches = new HashMap<ConfigurationKey, CacheInstance>();
+ caches = new ConcurrentHashMap<ConfigurationKey, CacheInstance>();
allCacheTypes.put(cacheType, caches);
}
Configuration cfg = cache.getConfiguration();
14 years, 1 month