Examples of JobExecutionException


Examples of org.quartz.JobExecutionException

        try {
            getLoadBalancer().process(exchange);

            if (exchange.getException() != null) {
                // propagate the exception back to Quartz
                throw new JobExecutionException(exchange.getException());
            }
        } catch (Exception e) {
            // log the error
            LOG.error(ExchangeHelper.createExceptionMessage("Error processing exchange", exchange, e));

            // and rethrow to let quartz handle it
            if (e instanceof JobExecutionException) {
                throw (JobExecutionException) e;
            }
            throw new JobExecutionException(e);
        }
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

    public void execute(final JobExecutionContext context) throws JobExecutionException {
        SchedulerContext schedulerContext;
        try {
            schedulerContext = context.getScheduler().getContext();
        } catch (SchedulerException e) {
            throw new JobExecutionException("Failed to obtain scheduler context for job " + context.getJobDetail().getName());
        }

        CamelContext camelContext = (CamelContext) schedulerContext.get(QuartzConstants.QUARTZ_CAMEL_CONTEXT);
        String endpointUri = (String) context.getJobDetail().getJobDataMap().get(QuartzConstants.QUARTZ_ENDPOINT);
        QuartzEndpoint quartzEndpoint = (QuartzEndpoint) camelContext.getEndpoint(endpointUri);
View Full Code Here

Examples of org.quartz.JobExecutionException

public class CamelJob implements Job, Serializable {

    public void execute(JobExecutionContext context) throws JobExecutionException {
        QuartzEndpoint endpoint = (QuartzEndpoint) context.getJobDetail().getJobDataMap().get(QuartzConstants.QUARTZ_ENDPOINT);
        if (endpoint == null) {
            throw new JobExecutionException("No quartz endpoint available for key: " + QuartzConstants.QUARTZ_ENDPOINT);
        }
        endpoint.onJobExecute(context);
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

        {
            taskQueue.put( task );
        }
        catch ( TaskQueueException e )
        {
            throw new JobExecutionException( e );
        }
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

                        catch (final RuntimeException re)
                        {
                            final Integer maxRefireCount = (Integer) jobDataMap.get(MAX_REFIRE_COUNT) ;
                            if ((maxRefireCount != null) && (maxRefireCount > context.getRefireCount()))
                            {
                                final JobExecutionException jobEx = new JobExecutionException(re, true);
                                jobEx.setErrorCode(JobExecutionException.ERR_JOB_EXECUTION_THREW_EXCEPTION);
                                throw jobEx ;
                            }
                            else
                            {
                                if (job != null)
View Full Code Here

Examples of org.quartz.JobExecutionException

            {
                listener.onSchedule() ;
            }
            catch (final SchedulingException se)
            {
                final JobExecutionException jobException = new JobExecutionException("Scheduling exception on " + jobExecutionContext.getTrigger().getName()) ;
                jobException.initCause(se) ;
                throw jobException ;
            }
            catch (final Throwable th)
            {
                final JobExecutionException jobException = new JobExecutionException("Unexpected exception on " + jobExecutionContext.getTrigger().getName()) ;
                jobException.initCause(th) ;
                throw jobException ;
            }
            finally
            {
                thread.setContextClassLoader(currentClassLoader) ;
View Full Code Here

Examples of org.quartz.JobExecutionException

        }
    }

    private void handleException(String msg) throws JobExecutionException {
        log.error(msg);
        throw new JobExecutionException(msg);
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

        throw new JobExecutionException(msg);
    }

    private void handleException(String msg, Exception e) throws JobExecutionException {
        log.error(msg, e);
        throw new JobExecutionException(msg, e);
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap(), null);
        try {
            wrapper.execute();
        } catch (ExecutionException e) {
          log.error("Task execution failed: ", e);
          throw new JobExecutionException();
        }
    }
View Full Code Here

Examples of org.quartz.JobExecutionException

            getMarshaler().populateNormalizedMessage(message, context);
            exchange.setInMessage(message);
            send(exchange);
        }
        catch (MessagingException e) {
            throw new JobExecutionException(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.