Search in sources :

Example 1 with DebugConfigSection

use of org.alfresco.jlan.debug.DebugConfigSection in project alfresco-repository by Alfresco.

the class AbstractServerConfigurationBean method init.

/**
 * Initialize the configuration using the configuration service
 */
public void init() {
    if (m_authenticationComponent == null) {
        throw new AlfrescoRuntimeException("Property 'authenticationComponent' not set");
    } else if (m_authenticationService == null) {
        throw new AlfrescoRuntimeException("Property 'authenticationService' not set");
    } else if (m_nodeService == null) {
        throw new AlfrescoRuntimeException("Property 'nodeService' not set");
    } else if (m_personService == null) {
        throw new AlfrescoRuntimeException("Property 'personService' not set");
    } else if (m_transactionService == null) {
        throw new AlfrescoRuntimeException("Property 'transactionService' not set");
    } else if (m_repoDiskInterface == null) {
        throw new AlfrescoRuntimeException("Property 'diskInterface' not set");
    } else if (m_authorityService == null) {
        throw new AlfrescoRuntimeException("Property 'authorityService' not set");
    }
    // Set the platform type
    determinePlatformType();
    // Create the debug output configuration using a logger for all file server debug output
    DebugConfigSection debugConfig = new DebugConfigSection(this);
    try {
        debugConfig.setDebug("org.alfresco.filesys.debug.FileServerDebugInterface", new GenericConfigElement("params"));
    } catch (InvalidConfigurationException ex) {
    }
    // Create the global configuration and Alfresco configuration sections
    new GlobalConfigSection(this);
    new AlfrescoConfigSection(this);
    // Install the Alfresco client information factory
    ClientInfo.setFactory(new AlfrescoClientInfoFactory());
    try {
        // Get the CIFS server config section and extract the WINS server config, if available
        processWINSServerConfig();
    } catch (Exception ex) {
        // Configuration error
        logger.error("File server configuration error (WINS), " + ex.getMessage(), ex);
    }
    try {
        // Process the core server configuration
        processCoreServerConfig();
        // Process the security configuration
        processSecurityConfig();
        // Process the filesystems configuration
        processFilesystemsConfig();
    } catch (Exception ex) {
        // Configuration error
        throw new AlfrescoRuntimeException("File server configuration error, " + ex.getMessage(), ex);
    }
    try {
        // Process the FTP server configuration
        processFTPServerConfig();
        // Log the successful startup
        logger.info("FTP server " + (isFTPServerEnabled() ? "" : "NOT ") + "started");
    } catch (Exception ex) {
        // Configuration error
        logger.error("FTP server configuration error, " + ex.getMessage(), ex);
    }
}
Also used : GenericConfigElement(org.springframework.extensions.config.element.GenericConfigElement) AlfrescoClientInfoFactory(org.alfresco.filesys.alfresco.AlfrescoClientInfoFactory) AlfrescoRuntimeException(org.alfresco.error.AlfrescoRuntimeException) GlobalConfigSection(org.alfresco.jlan.server.config.GlobalConfigSection) DebugConfigSection(org.alfresco.jlan.debug.DebugConfigSection) SocketException(java.net.SocketException) IOException(java.io.IOException) AlfrescoRuntimeException(org.alfresco.error.AlfrescoRuntimeException) InvalidConfigurationException(org.alfresco.jlan.server.config.InvalidConfigurationException) BeansException(org.springframework.beans.BeansException) UnknownHostException(java.net.UnknownHostException) InvalidConfigurationException(org.alfresco.jlan.server.config.InvalidConfigurationException)

Aggregations

IOException (java.io.IOException)1 SocketException (java.net.SocketException)1 UnknownHostException (java.net.UnknownHostException)1 AlfrescoRuntimeException (org.alfresco.error.AlfrescoRuntimeException)1 AlfrescoClientInfoFactory (org.alfresco.filesys.alfresco.AlfrescoClientInfoFactory)1 DebugConfigSection (org.alfresco.jlan.debug.DebugConfigSection)1 GlobalConfigSection (org.alfresco.jlan.server.config.GlobalConfigSection)1 InvalidConfigurationException (org.alfresco.jlan.server.config.InvalidConfigurationException)1 BeansException (org.springframework.beans.BeansException)1 GenericConfigElement (org.springframework.extensions.config.element.GenericConfigElement)1