Package org.quartz

Examples of org.quartz.SchedulerException


          if (_txm.getStatus() == Status.STATUS_MARKED_ROLLBACK) {
              log.debug("UserTransaction marked for rollback only.");
              successfulExecution = false;
          }
      } catch (SystemException e) {
          throw new SchedulerException(
                  "JTAJobRunShell could not read UserTransaction status.", e);
      }

      if (successfulExecution) {
          try {
              if (__log.isDebugEnabled()) __log.debug("Commiting transaction.");
              _txm.commit();
          } catch (Exception nse) {
              throw new SchedulerException(
                      "JTAJobRunShell could not commit UserTransaction.", nse);
          }
      } else {
          try {
              if (__log.isDebugEnabled()) __log.debug("Rollbacking transaction.");         
              _txm.rollback();
          } catch (Exception nse) {
              throw new SchedulerException(
                      "JTAJobRunShell could not rollback UserTransaction.",
                      nse);
          }
      }
View Full Code Here


        Properties answer = getProperties();
        if (answer == null && getPropertiesFile() != null) {
            LOG.info("Loading Quartz properties file from classpath: {}", getPropertiesFile());
            InputStream is = getCamelContext().getClassResolver().loadResourceAsStream(getPropertiesFile());
            if (is == null) {
                throw new SchedulerException("Quartz properties file not found in classpath: " + getPropertiesFile());
            }
            answer = new Properties();
            try {
                answer.load(is);
            } catch (IOException e) {
                throw new SchedulerException("Error loading Quartz properties file from classpath: " + getPropertiesFile(), e);
            }
        }
        return answer;
    }
View Full Code Here

            // or setFactory(SchedulerFactory) methods

            // must use classloader from StdSchedulerFactory to work even in OSGi
            InputStream is = StdSchedulerFactory.class.getClassLoader().getResourceAsStream("org/quartz/quartz.properties");
            if (is == null) {
                throw new SchedulerException("Quartz properties file not found in classpath: org/quartz/quartz.properties");
            }
            prop = new Properties();
            try {
                prop.load(is);
            } catch (IOException e) {
                throw new SchedulerException("Error loading Quartz properties file from classpath: org/quartz/quartz.properties", e);
            }

            // camel context name will be a suffix to use one scheduler per context
            String identity = getCamelContext().getName();
View Full Code Here

      }
      if (ex instanceof SchedulerException) {
        throw (SchedulerException) ex;
      }
      if (ex instanceof Exception) {
        throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage(), ex);
      }
      throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage());
    }

    if (transactionStatus != null) {
      this.transactionManager.commit(transactionStatus);
    }
View Full Code Here

    try {
      Object jobObject = createJobInstance(bundle);
      return adaptJob(jobObject);
    }
    catch (Exception ex) {
      throw new SchedulerException("Job instantiation failed", ex);
    }
  }
View Full Code Here

      }
      if (ex instanceof SchedulerException) {
        throw (SchedulerException) ex;
      }
      if (ex instanceof Exception) {
        throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage(), ex);
      }
      throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage());
    }

    if (transactionStatus != null) {
      this.transactionManager.commit(transactionStatus);
    }
View Full Code Here

      }
      if (ex instanceof SchedulerException) {
        throw (SchedulerException) ex;
      }
      if (ex instanceof Exception) {
        throw new SchedulerException(
            "Registration of jobs and triggers failed: " + ex.getMessage(), (Exception) ex);
      }
      throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage());
    }

    if (transactionStatus != null) {
      this.transactionManager.commit(transactionStatus);
    }
View Full Code Here

    try {
      Object jobObject = createJobInstance(bundle);
      return adaptJob(jobObject);
    }
    catch (Exception ex) {
      throw new SchedulerException("Job instantiation failed", ex);
    }
  }
View Full Code Here

      }
      if (ex instanceof SchedulerException) {
        throw (SchedulerException) ex;
      }
      if (ex instanceof Exception) {
        throw new SchedulerException(
            "Registration of jobs and triggers failed: " + ex.getMessage(), (Exception) ex);
      }
      throw new SchedulerException("Registration of jobs and triggers failed: " + ex.getMessage());
    }

    if (transactionStatus != null) {
      this.transactionManager.commit(transactionStatus);
    }
View Full Code Here

        throws SchedulerException
    {

        if ( jobDetail == null || jobDetail.getKey() == null || jobDetail.getKey().getName() == null )
        {
            throw new SchedulerException( "No job or no job name - cannot schedule this job" );
        }

        if ( jobExists( jobDetail.getKey() ) )
        {
            log.warn( "Will not schedule this job as a job ({}:{}) already exists.",
                      jobDetail.getKey().getName(), jobDetail.getKey().getGroup() );

            return;
        }

        try
        {
            scheduler.scheduleJob( jobDetail, trigger );
        }
        catch ( SchedulerException e )
        {
            throw new SchedulerException( "Error scheduling job.", e );
        }
        catch ( Exception e )
        {
            throw new SchedulerException( "Error scheduling job (Verify your cron expression).", e );
        }
    }
View Full Code Here

TOP

Related Classes of org.quartz.SchedulerException

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.