From 503b462749f1deff34e8317ad9912078daf06bab Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Wed, 8 Feb 2012 11:33:18 +0000 Subject: [PATCH] Merged V4.0 to HEAD 33056: Fix for ALF-12280: Upgrading from version 3.4.7 to 4.0.0 failed with MS SQL database - Added dialect-specific script for SQL Server 33059: Fix for ALF-12127, ALF-11161, ALF-11988 Merged BRANCHES/DEV/THOR1 to BRANCHES/V4.0 33049: Fixed follow issues on THOR-839 & THOR-826 - Following webscripts now sets "Content-Type" response header to application/json - which makes people search display follow buttons for people correctly Fix for ALF-12077 Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/V4.0 32999: Fix for ALF-12050 - IE specific handling of Ajax requests does not correctly respect no-cache setting, need to set Expires header also 33060: Fix for ALF-12208 - group name encoding 33073: Fix for ALF-12295 - CLONE - Upload issue ? - Failed to get content ... (No such file or directory) ... x22 33087: Calendar: Permissions updates, fixes: ALF-12179 & makes the permissions flag boolean. 33088: FIXED : ALF-11862: An error message appears when you open the "edit task", to request to join the "moderated site" Now handles null value 33102: Fix for ACT #15024-37148 (will update with JIRA no. once available) - issue where in a load balanced Share environment (multiple web-tiers behind a reverse proxy) the modification to the template layout selection for a site or user dashboard would not be reflected in all servers. 33105: Bitrock license notice file. 33110: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/V4.0: 33109: ALF-11479: When upgrading from Alfresco Community 3.4.d to 4.0.b, some nodes that are blocked and have versions fail after the upgrade 33114: Merged DEV to V4.0 33067: Fix ALF-12206: CMIS: Error getting association information referencing archived node 33122: Fix for ALF-12316 Repo -> SOLR query uses HTTPClient that only supports 2 simultaneous connections - configurable via spring (default if unconfigured is 40 connections to one host and 40 max connections) 33142: ALF-12339: Prevents ArrayOutOfBoundsException that can occur with concurrent access of i18n bundle in WebScript 33320: (RECORD ONLY) Merged BRANCHES\DEV\V4.0-BUG-FIX to BRANCHESV4.0 33305: ALF-12463 Error querying database was detected during upgrade process from 3.1 to 4.0.0. 33326: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/V4.0 33277 ALF-12468 CLONE - Regression. Searches cause database server to thrash CPU - ALF-12426 33331: Merged BRANCHES\DEV\V3.4-BUG-FIX to BRANCHES\V4.0 33301: ALF-12464: Merged PATCHES/V3.4.5 to V3.4-BUG-FIX 33299: ALF-12281: Memory leak in ReferenceCountingReadOnlyIndexReaderFactory 33303: ALF-12464: Merged PATCHES/V3.4.5 to V3.4-BUG-FIX 33302: ALF-12281: Correction to previous checkin - deal with the initial reference created by the constructor and cleared by closeIfRequired() git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/core-services-context.xml | 2 ++ config/alfresco/repository.properties | 4 ++++ source/java/org/alfresco/opencmis/CMISConnector.java | 12 ++++++++---- .../java/org/alfresco/opencmis/CMISNodeInfoImpl.java | 8 +++++--- .../alfresco/opencmis/mapping/TargetIdProperty.java | 4 +++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml index 0d7a5d5765..2f1726e72d 100644 --- a/config/alfresco/core-services-context.xml +++ b/config/alfresco/core-services-context.xml @@ -1036,6 +1036,8 @@ + + diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties index e78282f4e4..d35078c2c8 100644 --- a/config/alfresco/repository.properties +++ b/config/alfresco/repository.properties @@ -821,6 +821,10 @@ solr.solrPassword=solr # none, https solr.secureComms=https + +solr.max.total.connections=40 +solr.max.host.connections=40 + # Solr connection timeouts # solr connect timeout in ms solr.solrConnectTimeout=5000 diff --git a/source/java/org/alfresco/opencmis/CMISConnector.java b/source/java/org/alfresco/opencmis/CMISConnector.java index a9dc1f6cfe..b9620cd247 100644 --- a/source/java/org/alfresco/opencmis/CMISConnector.java +++ b/source/java/org/alfresco/opencmis/CMISConnector.java @@ -1198,16 +1198,20 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen Set filterSet = splitFilter(filter); - for (PropertyDefinitionWrapper propDef : info.getType().getProperties()) + for (PropertyDefinitionWrapper propDefWrap : info.getType().getProperties()) { - if ((filterSet != null) && (!filterSet.contains(propDef.getPropertyDefinition().getQueryName()))) + PropertyDefinition propDef = propDefWrap.getPropertyDefinition(); + if ((filterSet != null) && (!filterSet.contains(propDef.getQueryName()))) { // skip properties that are not in the filter continue; } - Serializable value = propDef.getPropertyAccessor().getValue(info); - result.addProperty(getProperty(propDef.getPropertyDefinition().getPropertyType(), propDef, value)); + CMISPropertyAccessor cmisPropertyAccessor = propDefWrap.getPropertyAccessor(); + Serializable value = cmisPropertyAccessor.getValue(info); + PropertyType propType = propDef.getPropertyType(); + PropertyData propertyData = getProperty(propType, propDefWrap, value); + result.addProperty(propertyData); } return result; diff --git a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java index f71c629185..2e4cd1bfda 100644 --- a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java +++ b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java @@ -275,7 +275,8 @@ public class CMISNodeInfoImpl implements CMISNodeInfo objectId = nodeRef.toString(); currentObjectId = objectId; return; - } else if (getType() == null) + } + else if (getType() == null) { objecVariant = CMISObjectVariant.NOT_A_CMIS_OBJECT; return; @@ -308,7 +309,8 @@ public class CMISNodeInfoImpl implements CMISNodeInfo objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + CMISConnector.UNVERSIONED_VERSION_LABEL; versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL; currentObjectId = objectId; - } else + } + else { Version headVersion = versionHistory.getHeadVersion(); @@ -322,7 +324,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo : CMISObjectVariant.VERSION); } - hasPWC = connector.getCheckOutCheckInService().isCheckedOut(getCurrentNodeNodeRef()); + hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef); } protected void analyseAssociationRef() diff --git a/source/java/org/alfresco/opencmis/mapping/TargetIdProperty.java b/source/java/org/alfresco/opencmis/mapping/TargetIdProperty.java index 60a013bf03..16a266210d 100644 --- a/source/java/org/alfresco/opencmis/mapping/TargetIdProperty.java +++ b/source/java/org/alfresco/opencmis/mapping/TargetIdProperty.java @@ -23,6 +23,7 @@ import java.io.Serializable; import org.alfresco.opencmis.CMISConnector; import org.alfresco.opencmis.dictionary.CMISNodeInfo; import org.alfresco.service.ServiceRegistry; +import org.alfresco.service.cmr.repository.NodeRef; import org.apache.chemistry.opencmis.commons.PropertyIds; /** @@ -44,6 +45,7 @@ public class TargetIdProperty extends AbstractProperty public Serializable getValueInternal(CMISNodeInfo nodeInfo) { - return createNodeInfo(nodeInfo.getAssociationRef().getTargetRef()).getObjectId(); + NodeRef targetNodeRef = nodeInfo.getAssociationRef().getTargetRef(); + return createNodeInfo(targetNodeRef).getObjectId(); } }