Examples of QuartzComponent


Examples of org.apache.camel.component.quartz2.QuartzComponent

    protected void doStart() throws Exception {
        ObjectHelper.notEmpty(cron, "cron", this);

        if (quartzScheduler == null) {
            // get the scheduler form the quartz component
            QuartzComponent quartz = getCamelContext().getComponent("quartz2", QuartzComponent.class);
            setQuartzScheduler(quartz.getScheduler());
        }

        JobDataMap map = new JobDataMap();
        map.put("task", runnable);
        job = JobBuilder.newJob(QuartzScheduledPollConsumerJob.class)
View Full Code Here

Examples of org.apache.camel.component.quartz2.QuartzComponent

            throw ObjectHelper.wrapRuntimeCamelException(e);
        }
    }

    protected void doOnInit(Route route) throws Exception {
        QuartzComponent quartz = route.getRouteContext().getCamelContext().getComponent("quartz2", QuartzComponent.class);
        setScheduler(quartz.getScheduler());

        // Important: do not start scheduler as QuartzComponent does that automatic
        // when CamelContext has been fully initialized and started

        if (getRouteStopGracePeriod() == 0) {
View Full Code Here

Examples of org.apache.servicemix.quartz.QuartzComponent

        try {
            String componentName = (String) context.getJobDetail().getJobDataMap().get(COMPONENT_NAME);
            if (componentName == null) {
                throw new JobExecutionException("No property '" + COMPONENT_NAME + "' defined. Bad job data map");
            }
            QuartzComponent component = (QuartzComponent) context.getScheduler().getContext().get(componentName);
            if (component == null) {
                throw new JobExecutionException("No quartz JBI component available for key: " + componentName + "."
                        + " Bad job data map");
            }
            String endpointName = (String) context.getJobDetail().getJobDataMap().get(ENDPOINT_NAME);
            if (endpointName == null) {
                throw new JobExecutionException("No property '" + ENDPOINT_NAME + "' defined. Bad job data map");
            }
            QuartzEndpoint endpoint = (QuartzEndpoint) component.getRegistry().getEndpoint(endpointName);
            if (endpoint == null) {
                throw new JobExecutionException("No quartz JBI endpoint available for key: " + endpointName + "."
                        + " Bad job data map");
            }
            endpoint.onJobExecute(context);
View Full Code Here

Examples of org.apache.servicemix.quartz.QuartzComponent

        try {
            String componentName = (String) context.getJobDetail().getJobDataMap().get(COMPONENT_NAME);
            if (componentName == null) {
                throw new JobExecutionException("No property '" + COMPONENT_NAME + "' defined. Bad job data map");
            }
            QuartzComponent component = (QuartzComponent) context.getScheduler().getContext().get(componentName);
            if (component == null) {
                throw new JobExecutionException("No quartz JBI component available for key: " + componentName + ". Bad job data map");
            }
            String endpointName = (String) context.getJobDetail().getJobDataMap().get(ENDPOINT_NAME);
            if (endpointName == null) {
                throw new JobExecutionException("No property '" + ENDPOINT_NAME + "' defined. Bad job data map");
            }
            QuartzEndpoint endpoint = (QuartzEndpoint) component.getRegistry().getEndpoint(endpointName);
            if (endpoint == null) {
                throw new JobExecutionException("No quartz JBI endpoint available for key: " + endpointName + ". Bad job data map");
            }
            endpoint.onJobExecute(context);
        } catch (SchedulerException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.