Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

108205: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud)
      108186:       Reverse merged 5.0.N (5.0.3)
               << Better solution found >>
               106968: Merged DEV to 5.0.N (5.0.3)
                  106962: MNT-13706 : Admin console unusable after we set any  busy port in Port Number Value for subsystem
                     - Implemented fix for Transformations (JodConverter), FTP, SMTP and IMAP.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@108221 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-07-14 07:03:15 +00:00
parent 576d2a0afd
commit f13dc0a415
8 changed files with 1533 additions and 1843 deletions

View File

@@ -83,11 +83,7 @@ import org.alfresco.jlan.util.Platform;
import org.alfresco.jlan.util.StringList;
import org.alfresco.jlan.util.X64;
import org.alfresco.repo.management.subsystems.ActivateableBean;
import org.alfresco.repo.management.subsystems.LoggableErrorEvent;
import org.alfresco.util.PortUtil;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.extensions.config.element.GenericConfigElement;
@@ -103,10 +99,8 @@ import org.springframework.extensions.config.element.GenericConfigElement;
* @author dward
* @author mrogers
*/
public class ServerConfigurationBean extends AbstractServerConfigurationBean implements DisposableBean, ApplicationEventPublisherAware
public class ServerConfigurationBean extends AbstractServerConfigurationBean implements DisposableBean
{
private static final String FTP_PORT_OCCUPIED_MESSAGE = "system.ftp.err.port_in_use";
private CIFSConfigBean cifsConfigBean;
private FTPConfigBean ftpConfigBean;
private NFSConfigBean nfsConfigBean;
@@ -116,8 +110,7 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean imp
private ThreadRequestPool threadPool;
protected ClusterConfigBean clusterConfigBean;
private ApplicationEventPublisher applicationEventPublisher;
/**
* Default constructor
*/
@@ -1227,13 +1220,6 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean imp
ftpConfig.setFTPPort(port);
if (ftpConfig.getFTPPort() <= 0 || ftpConfig.getFTPPort() >= 65535)
throw new AlfrescoRuntimeException("FTP server port out of valid range");
// Check if port is occupied.
if (!PortUtil.isPortFree(port))
{
applicationEventPublisher.publishEvent(new LoggableErrorEvent(this,
new AlfrescoRuntimeException(FTP_PORT_OCCUPIED_MESSAGE, new String[] { "" + port })));
}
}
else
{
@@ -2382,10 +2368,4 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean imp
}
}
@Override
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
{
this.applicationEventPublisher = applicationEventPublisher;
}
}