mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7056: Ability to disable/enable CIFS/FTP/NFS via JMX Console git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8235 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -87,7 +87,7 @@ public class CIFSServerBean extends AbstractLifecycleBean
|
||||
*/
|
||||
public boolean isStarted()
|
||||
{
|
||||
return (m_filesysConfig != null && m_filesysConfig.isServerRunning( "CIFS"));
|
||||
return (!serverList.isEmpty() && m_filesysConfig.isServerRunning( "CIFS"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +138,12 @@ public class CIFSServerBean extends AbstractLifecycleBean
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
m_filesysConfig = null;
|
||||
for (NetworkServer server : serverList)
|
||||
{
|
||||
getConfiguration().removeServer(server.getProtocolName());
|
||||
}
|
||||
|
||||
serverList.clear();
|
||||
throw new AlfrescoRuntimeException("Failed to start CIFS Server", e);
|
||||
}
|
||||
// success
|
||||
@@ -171,10 +176,9 @@ public class CIFSServerBean extends AbstractLifecycleBean
|
||||
getConfiguration().removeServer(server.getProtocolName());
|
||||
}
|
||||
|
||||
// Clear the server list and configuration
|
||||
// Clear the server list
|
||||
|
||||
serverList.clear();
|
||||
m_filesysConfig = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -277,6 +281,9 @@ public class CIFSServerBean extends AbstractLifecycleBean
|
||||
protected void onShutdown(ApplicationEvent event)
|
||||
{
|
||||
stopServer();
|
||||
|
||||
// Clear the configuration
|
||||
m_filesysConfig = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user