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:
Jan Vonka
2008-02-08 17:22:02 +00:00
parent 840b3e45be
commit 83ab25f486
6 changed files with 140 additions and 18 deletions

View File

@@ -91,7 +91,7 @@ public class NFSServerBean extends AbstractLifecycleBean
*/
public boolean isStarted()
{
return (m_filesysConfig != null && m_filesysConfig.isServerRunning( "NFS"));
return (!m_serverList.isEmpty() && m_filesysConfig.isServerRunning( "NFS"));
}
/**
@@ -142,7 +142,12 @@ public class NFSServerBean extends AbstractLifecycleBean
}
catch (Throwable e)
{
m_filesysConfig = null;
for (NetworkServer server : m_serverList)
{
getConfiguration().removeServer(server.getProtocolName());
}
m_serverList.clear();
throw new AlfrescoRuntimeException("Failed to start NFS Server", e);
}
}
@@ -177,10 +182,9 @@ public class NFSServerBean extends AbstractLifecycleBean
getConfiguration().removeServer(server.getProtocolName());
}
// Clear the server list and configuration
// Clear the server list
m_serverList.clear();
m_filesysConfig = null;
}
/**
@@ -283,5 +287,8 @@ public class NFSServerBean extends AbstractLifecycleBean
protected void onShutdown(ApplicationEvent event)
{
stopServer();
// Clear the configuration
m_filesysConfig = null;
}
}