Search in sources :

Example 1 with BPELSchedulerInitializer

use of org.wso2.carbon.bpel.core.ode.integration.BPELSchedulerInitializer in project carbon-business-process by wso2.

the class BPELServiceComponent method activate.

protected void activate(ComponentContext ctxt) {
    try {
        this.bundleContext = ctxt.getBundleContext();
        if (dataSourceServiceProvided) {
            initializeBPELServer();
            registerAxis2ConfigurationContextObserver();
            registerBPELServerService();
        }
        bundleContext.registerService(ServerStartupObserver.class.getName(), new BPELSchedulerInitializer(), null);
        // registering service to shutdown ode scheduler, before server shutdown
        bundleContext.registerService(WaitBeforeShutdownObserver.class.getName(), new BPELSchedulerShutdown(), null);
    } catch (Throwable t) {
        log.error("Failed to activate BPEL Core bundle", t);
    }
    if (log.isDebugEnabled()) {
        log.debug("BPEL Core bundle is activated.");
    }
}
Also used : ServerStartupObserver(org.wso2.carbon.core.ServerStartupObserver) BPELSchedulerShutdown(org.wso2.carbon.bpel.core.ode.integration.BPELSchedulerShutdown) WaitBeforeShutdownObserver(org.wso2.carbon.utils.WaitBeforeShutdownObserver) BPELSchedulerInitializer(org.wso2.carbon.bpel.core.ode.integration.BPELSchedulerInitializer)

Aggregations

BPELSchedulerInitializer (org.wso2.carbon.bpel.core.ode.integration.BPELSchedulerInitializer)1 BPELSchedulerShutdown (org.wso2.carbon.bpel.core.ode.integration.BPELSchedulerShutdown)1 ServerStartupObserver (org.wso2.carbon.core.ServerStartupObserver)1 WaitBeforeShutdownObserver (org.wso2.carbon.utils.WaitBeforeShutdownObserver)1