Search in sources :

Example 1 with WorkflowsStatistics

use of org.opencastproject.workflow.impl.jmx.WorkflowsStatistics in project opencast by opencast.

the class WorkflowServiceImpl method activate.

/**
 * Activate this service implementation via the OSGI service component runtime.
 *
 * @param componentContext
 *          the component context
 */
public void activate(ComponentContext componentContext) {
    this.componentContext = componentContext;
    executorService = (ThreadPoolExecutor) Executors.newCachedThreadPool();
    try {
        logger.info("Generating JMX workflow statistics");
        workflowsStatistics = new WorkflowsStatistics(getBeanStatistics(), getHoldWorkflows());
        jmxBeans.add(JmxUtil.registerMXBean(workflowsStatistics, JMX_WORKFLOWS_STATISTICS_TYPE));
    } catch (WorkflowDatabaseException e) {
        logger.error("Error registarting JMX statistic beans", e);
    }
    super.activate();
    logger.info("Activate Workflow service");
}
Also used : WorkflowDatabaseException(org.opencastproject.workflow.api.WorkflowDatabaseException) WorkflowsStatistics(org.opencastproject.workflow.impl.jmx.WorkflowsStatistics)

Aggregations

WorkflowDatabaseException (org.opencastproject.workflow.api.WorkflowDatabaseException)1 WorkflowsStatistics (org.opencastproject.workflow.impl.jmx.WorkflowsStatistics)1