Search in sources :

Example 1 with MLdapProcessor

use of org.compiere.model.MLdapProcessor in project adempiere by adempiere.

the class AdempiereServerMgr method startServers.

//	startEnvironment
/**
	 * 	Start Environment
	 *	@return true if started
	 */
private boolean startServers() {
    log.info("");
    int noServers = 0;
    //	Accounting
    MAcctProcessor[] acctModels = MAcctProcessor.getActive(m_ctx);
    for (int i = 0; i < acctModels.length; i++) {
        MAcctProcessor pModel = acctModels[i];
        AdempiereServer server = AdempiereServer.create(pModel);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 2);
        m_servers.add(server);
    }
    //	Request
    MRequestProcessor[] requestModels = MRequestProcessor.getActive(m_ctx);
    for (int i = 0; i < requestModels.length; i++) {
        MRequestProcessor pModel = requestModels[i];
        AdempiereServer server = AdempiereServer.create(pModel);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 2);
        m_servers.add(server);
    }
    //	Workflow
    MWorkflowProcessor[] workflowModels = MWorkflowProcessor.getActive(m_ctx);
    for (int i = 0; i < workflowModels.length; i++) {
        MWorkflowProcessor pModel = workflowModels[i];
        AdempiereServer server = AdempiereServer.create(pModel);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 2);
        m_servers.add(server);
    }
    //	Alert
    MAlertProcessor[] alertModels = MAlertProcessor.getActive(m_ctx);
    for (int i = 0; i < alertModels.length; i++) {
        MAlertProcessor pModel = alertModels[i];
        AdempiereServer server = AdempiereServer.create(pModel);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 2);
        m_servers.add(server);
    }
    //	Scheduler
    MScheduler[] schedulerModels = MScheduler.getActive(m_ctx);
    for (int i = 0; i < schedulerModels.length; i++) {
        MScheduler pModel = schedulerModels[i];
        AdempiereServer server = AdempiereServer.create(pModel);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 2);
        m_servers.add(server);
    }
    //	LDAP
    MLdapProcessor[] ldapModels = MLdapProcessor.getActive(m_ctx);
    for (int i = 0; i < ldapModels.length; i++) {
        MLdapProcessor lp = ldapModels[i];
        AdempiereServer server = AdempiereServer.create(lp);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 1);
        m_servers.add(server);
    }
    //	ImportProcessor - @Trifon
    MIMPProcessor[] importModels = MIMPProcessor.getActive(m_ctx);
    for (int i = 0; i < importModels.length; i++) {
        MIMPProcessor lp = importModels[i];
        AdempiereServer server = AdempiereServer.create(lp);
        server.start();
        server.setPriority(Thread.NORM_PRIORITY - 1);
        m_servers.add(server);
    }
    log.fine("#" + noServers);
    return startAll();
}
Also used : MRequestProcessor(org.compiere.model.MRequestProcessor) MLdapProcessor(org.compiere.model.MLdapProcessor) MAcctProcessor(org.compiere.model.MAcctProcessor) MIMPProcessor(org.compiere.model.MIMPProcessor) MWorkflowProcessor(org.compiere.wf.MWorkflowProcessor) MScheduler(org.compiere.model.MScheduler) MAlertProcessor(org.compiere.model.MAlertProcessor)

Example 2 with MLdapProcessor

use of org.compiere.model.MLdapProcessor in project adempiere by adempiere.

the class LdapProcessor method main.

//	getServerInfo
/**
	 * 	Test
	 *	@param args
	 */
public static void main(String[] args) {
    Adempiere.startup(true);
    new LdapProcessor(new MLdapProcessor(new Properties(), 100, null)).doWork();
}
Also used : MLdapProcessor(org.compiere.model.MLdapProcessor) Properties(java.util.Properties) MLdapProcessor(org.compiere.model.MLdapProcessor)

Aggregations

MLdapProcessor (org.compiere.model.MLdapProcessor)2 Properties (java.util.Properties)1 MAcctProcessor (org.compiere.model.MAcctProcessor)1 MAlertProcessor (org.compiere.model.MAlertProcessor)1 MIMPProcessor (org.compiere.model.MIMPProcessor)1 MRequestProcessor (org.compiere.model.MRequestProcessor)1 MScheduler (org.compiere.model.MScheduler)1 MWorkflowProcessor (org.compiere.wf.MWorkflowProcessor)1