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(); + } + } + +}