public bool ConfigApplication()
{
var path = config[CONF_APPLICATION_LIBRARY];
if (getApplication == null)
{
WARN("Module {0} doesn't export any applications", path);
return true;
}
pApplication = getApplication(config);
pApplication.Id = ++BaseClientApplication._idGenerator;
if (pApplication == null)
{
FATAL("Unable to load application {0}.",config[CONF_APPLICATION_NAME]);
return false;
}
INFO("Application {0} instantiated",pApplication.Name);
if (!pApplication.RegisterApplication())
{
FATAL("Unable to register application {0}",pApplication.Name);
pApplication = null;
return false;
}
if (!pApplication.Initialize())
{
FATAL("Unable to initialize the application:{0}",pApplication.Name);
return false;
}
if (!pApplication.ParseAuthentication())
{
FATAL("Unable to parse authetication for application {0}",pApplication.Name);
return false;
}
if (!pApplication.ActivateAcceptors(acceptors))
{
FATAL("Unable to activate acceptors for application {0}", pApplication.Name);
return false;
}
return true;
}
};