From 6bb340048ab6f7a503e04da2aa0f69843b08f1e3 Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Mon, 17 Dec 2012 14:55:13 +0000 Subject: [PATCH] Merged V4.1-BUG-FIX to HEAD 44740: BDE-91 - added ability to enable and disable some RMI services through config. 44744: Incorrect service url used for Links RSS feed. Code tidy up. 44754: Fix performance degradation when using SSO header based authentication config: - The SlingshotAlfrescoConnector used when configuring header based SSO for Share was not extending the RequestCachingConnector class - means it was missing out on the free caching of identical GET requests per page render - This makes a huge difference to the number of small requests required to build pages in Share 4.0+, particularly dashboards and document details pages. 44759: ALF-17245: Merged PATCHES/V3.4.10 to V4.1-BUG-FIX 44104: Merged DEV to PATCHES/V3.4.10 43953: MNT-214 : Modification date is lost when Excel 2003 is closed The modification date is now updated during rename operation. 44711: Merged DEV to PATCHES/V3.4.10 44699: MNT-214 : Modification date is lost when Excel 2003 is closed A fix to save modification date in shuffle rename operation. 44760: ALF-17246: Merged V3.4-BUG-FIX to V4.1-BUG-FIX 44757: ALF-17073: Advanced search - Lucene query construction - Change between 3.4.9 and 3.4.10 - In the fix to ALF-12666 followed by ALF-14699 we somehow lost the ability to distinguish ANDs from ORs. The 'additional attributes' should be part of an OR, but we still need to AND together multiple ORs if the AND operator is specified. 44761: Merged V3.4-BUG-FIX to V4.1-BUG-FIX (RECORD ONLY) 44748: Merged PATCHES/V3.4.10 to V3.4-BUG-FIX 42311: ALF-17235: Merged PATCHES/V4.0.2 to PATCHES/V3.4.10 39939: ALF-15001: Gracefully handle stale NodeRefs in query results in DMDiscoveryServicePort - SOLR makes this more likely to occur 44104: ALF-17236: Merged DEV to PATCHES/V3.4.10 43953: MNT-214 : Modification date is lost when Excel 2003 is closed The modification date is now updated during rename operation. 44415: ALF-17237: Merged DEV to PATCHES/V3.4.10 MNT-211 : versionable aspect lost from .csv files edited over CIFS using Office 2003 44711: ALF-17236: Merged DEV to PATCHES/V3.4.10 44699: MNT-214 : Modification date is lost when Excel 2003 is closed A fix to save modification date in shuffle rename operation. 44762: Merged V4.1 to V4.1-BUG-FIX 44743: ALF-17117: Created article or publication cant be viewed on WQS site - Further corrections to locking to avoid deadlocks git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/core-services-context.xml | 4 +- config/alfresco/remote-services-context.xml | 25 ++++++++++--- config/alfresco/repository.properties | 11 ++++++ .../filesys/repo/ContentDiskDriver.java | 6 +++ .../server/AlfrescoRMIServiceExporter.java | 37 +++++++++++++++++++ 5 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 source/java/org/alfresco/util/remote/server/AlfrescoRMIServiceExporter.java diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml index 29db9aea30..e702c6221a 100644 --- a/config/alfresco/core-services-context.xml +++ b/config/alfresco/core-services-context.xml @@ -8,8 +8,8 @@ - - + + diff --git a/config/alfresco/remote-services-context.xml b/config/alfresco/remote-services-context.xml index c56380d5bf..1c784f7751 100644 --- a/config/alfresco/remote-services-context.xml +++ b/config/alfresco/remote-services-context.xml @@ -20,7 +20,7 @@ - + @@ -33,6 +33,9 @@ ${avm.rmi.service.port} + + ${avm.rmi.service.enabled} + @@ -47,7 +50,7 @@ - + @@ -60,13 +63,16 @@ ${avmsync.rmi.service.port} + + ${avmsync.rmi.service.enabled} + - + @@ -76,6 +82,9 @@ authentication + + ${authentication.rmi.service.enabled} + ${authentication.rmi.service.port} @@ -136,7 +145,7 @@ - + @@ -146,6 +155,9 @@ repo + + ${repo.rmi.service.enabled} + ${repo.rmi.service.port} @@ -165,7 +177,7 @@ - + @@ -175,6 +187,9 @@ action + + ${action.rmi.service.enabled} + ${action.rmi.service.port} diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties index 785e6d9aa6..fd06463485 100644 --- a/config/alfresco/repository.properties +++ b/config/alfresco/repository.properties @@ -543,7 +543,18 @@ action.rmi.service.port=50506 deployment.rmi.service.port=50507 monitor.rmi.service.port=50508 +# +# enable or disable individual RMI services +# +avm.rmi.service.enabled=true +avmsync.rmi.service.enabled=true +authentication.rmi.service.enabled=true +repo.rmi.service.enabled=true +action.rmi.service.enabled=true +deployment.rmi.service.enabled=true +monitor.rmi.service.enabled=true + # Should the Mbean server bind to an existing server. Set to true for most application servers. # false for WebSphere clusters. mbean.server.locateExistingServerIfPossible=true diff --git a/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java b/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java index 5cfe415a9f..52fc5abad7 100644 --- a/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java +++ b/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java @@ -3374,6 +3374,9 @@ public class ContentDiskDriver extends AlfrescoTxDiskDriver implements DiskInter newState.setFilesystemObject(nodeToMoveRef); newState.setFileSize(oldState.getFileSize()); + // the date is updated to be properly saved when the document is closed, see MNT-214 + newState.updateModifyDateTime(oldState.getModifyDateTime()); + // Make sure the old file state is cached for a short while, the file may not be open so the // file state could be expired @@ -3424,6 +3427,9 @@ public class ContentDiskDriver extends AlfrescoTxDiskDriver implements DiskInter newState.setFilesystemObject(finalTargetNodeRef); newState.setFileSize(oldState.getFileSize()); + // the date is updated to be properly saved when the document is closed, see MNT-214 + newState.updateModifyDateTime(oldState.getModifyDateTime()); + // Make sure the old file state is cached for a short while, the file may not be open so the // file state could be expired diff --git a/source/java/org/alfresco/util/remote/server/AlfrescoRMIServiceExporter.java b/source/java/org/alfresco/util/remote/server/AlfrescoRMIServiceExporter.java new file mode 100644 index 0000000000..cc35791b3e --- /dev/null +++ b/source/java/org/alfresco/util/remote/server/AlfrescoRMIServiceExporter.java @@ -0,0 +1,37 @@ +package org.alfresco.util.remote.server; + +import java.rmi.RemoteException; + +import org.springframework.remoting.rmi.RmiServiceExporter; + +public class AlfrescoRMIServiceExporter extends RmiServiceExporter +{ + private boolean enabled = true; + + public void setEnabled(boolean enabled) + { + this.enabled = enabled; + } + + public boolean isEnabled() + { + return enabled; + } + + public void prepare() throws RemoteException + { + if(enabled) + { + super.prepare(); + } + } + + public void destroy() throws RemoteException + { + if(enabled) + { + super.destroy(); + } + } + +}