Package org.quartz

Examples of org.quartz.JobExecutionException


    protected void throwJobExecutionException(String pluginName, Object pluginType, String jobId, String errorMsg,
        Throwable t) throws JobExecutionException {

        log.error(logMsg(pluginName, pluginType, jobId, errorMsg, t));

        JobExecutionException jobException;
        if (t != null) {
            jobException = new JobExecutionException(t, false);
        } else {
            jobException = new JobExecutionException(false);
        }
        jobException.setUnscheduleFiringTrigger(true);
        throw jobException;
    }
View Full Code Here


                    + "been deleted from inventory. Canceling job.";
                log.warn(msg);
                throw new CancelJobException(msg, e);
            }

            throw new JobExecutionException(error, e, false);
        } finally {
            // clean up our temporary session by logging out of it
            try {
                if (loggedInSubject != null) {
                    SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
View Full Code Here

                job.execute(execution);

            } catch (NoSuchMethodException e) {
                throw new IllegalStateException(e);
            } catch (ResourceException e) {
                throw new JobExecutionException(e);
            } catch (Throwable t) {
                throw new JobExecutionException(new Exception(t));
            } finally {

                if (null != endpoint) {
                    try {
                        endpoint.afterDelivery();
                    } catch (ResourceException e) {
                        throw new JobExecutionException(e);
                    }
                }
            }
        }
View Full Code Here

        SchedulerContext schedulerContext;
        try {
            schedulerContext = jobExecutionContext.getScheduler().getContext();
        } catch (SchedulerException e) {
            throw new JobExecutionException("Failed to obtain scheduler context for job " + jobExecutionContext.getJobDetail().getName());
        }
       
        ScheduledJobState state = (ScheduledJobState) schedulerContext.get(jobExecutionContext.getJobDetail().getName());
        Action storedAction = state.getAction();
        storedRoute = state.getRoute();
       
        List<RoutePolicy> policyList = storedRoute.getRouteContext().getRoutePolicyList();
        for (RoutePolicy policy : policyList) {
            try {
                if (policy instanceof ScheduledRoutePolicy) {
                    ((ScheduledRoutePolicy)policy).onJobExecute(storedAction, storedRoute);
                }
            } catch (Exception e) {
                throw new JobExecutionException("Failed to execute Scheduled Job for route " + storedRoute.getId() + " with trigger name: " + jobExecutionContext.getTrigger().getFullName());
            }
        }
    }
View Full Code Here

        try {
            balancer.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

        org.apache.cocoon.environment.Context envContext;
        try {
            envContext =
                (org.apache.cocoon.environment.Context) m_context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
        } catch (ContextException e) {
          throw new JobExecutionException(e);
        }
       
        try {
            m_env = new BackgroundEnvironment(m_logger, envContext);
        } catch (MalformedURLException e) {
            // Unlikely to happen
            throw new JobExecutionException(e);
        }

        try {
            m_processor = (Processor) m_manager.lookup(Processor.ROLE);
        } catch (ServiceException e) {
            throw new JobExecutionException(e);
        }

        m_key = CocoonComponentManager.startProcessing(m_env);
        CocoonComponentManager.enterEnvironment(m_env, new WrapperComponentManager(m_manager), m_processor);
    }
View Full Code Here

            appContext =
                (ApplicationContext)context.getScheduler().getContext().get("applicationContext");
        }
        catch(SchedulerException se)
        {
            throw new JobExecutionException(se);
        }

        reportLogProvider = (ReportLogProvider) appContext.getBean("reportLogProvider", ReportLogProvider.class);
        directoryProvider = (DirectoryProvider) appContext.getBean("directoryProvider", DirectoryProvider.class);
        alertProvider = (AlertProvider) appContext.getBean("alertProvider", AlertProvider.class);
View Full Code Here

        try {
            getLoadBalancer().process(exchange);
        } catch (JobExecutionException e) {
            throw e;
        } catch (Exception e) {
            throw new JobExecutionException(e);
        }
    }
View Full Code Here

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

            new AccessingRegistryAction(registryService.getConfigSystemRegistry()).execute();
            new AccessingRegistryAction(registryService.getGovernanceSystemRegistry()).execute();
        } catch (Exception e) {
            String msg = "Error in running registry actions.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }
        try {
            new AccessingBillingAction(Util.getBillingEngine()).execute();
        } catch (Exception e) {
            String msg = "Error in running billing engine action.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }
        try {
            new UserMgtAction(registryService).execute();
        } catch (Exception e) {
            String msg = "Error in running user manager actions.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.quartz.JobExecutionException

Copyright © 2018 www.massapicom. 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.