Package org.quartz

Examples of org.quartz.SchedulerFactory


{
  private Scheduler scheduler;

  public void start() throws SchedulerException
  {
    SchedulerFactory sf = new StdSchedulerFactory();
    this.scheduler = sf.getScheduler();
    this.scheduler.start();
  }
View Full Code Here


            Logging.severe("http://bukkit.onarandombox.com/?dir=multiverse-core");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        SchedulerFactory schedulerFactory = new StdSchedulerFactory();
        try {
            quartzScheduler = schedulerFactory.getScheduler();
            quartzScheduler.start();
        } catch (SchedulerException e) {
            quartzScheduler = null;
            log(Level.SEVERE, "Quartz Scheduler could not be started: " + e.getMessage());
        }
View Full Code Here

     * Start the scheduler. No special configuration done yet.
     * @throws SchedulerException
     */
    private static void initScheduler() throws SchedulerException
    {
        SchedulerFactory sf = new StdSchedulerFactory();
        scheduler = sf.getScheduler();
        scheduler.start();
    }
View Full Code Here

  
   private final Scheduler scheduler_;

   public QuartzSheduler(ExoContainerContext ctx) throws Exception
   {
      final SchedulerFactory sf = new StdSchedulerFactory();

      try
      {
         scheduler_ = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Scheduler>()
         {
            public Scheduler run() throws Exception
            {
               return sf.getScheduler();
            }
         });
      }
      catch (PrivilegedActionException pae)
      {
View Full Code Here

  
   private final Scheduler scheduler_;

   public QuartzSheduler(ExoContainerContext ctx) throws Exception
   {
      SchedulerFactory sf = new StdSchedulerFactory();
      scheduler_ = sf.getScheduler();
      // This will launch the scheduler when all the components will be started 
      ctx.getContainer().addContainerLifecylePlugin(new BaseContainerLifecyclePlugin()
      {

         @Override
View Full Code Here

    public static void main(String[] args) throws SchedulerException
    {
        log.info("------- Initializing ----------------------");

        // First we must get a reference to a scheduler
        SchedulerFactory sf = new StdSchedulerFactory();
        Scheduler sched = sf.getScheduler();

        log.info("------- Initialization Complete -----------");

        // computer a time that is on the next round minute
        Date runTime = evenMinuteDate(new Date());
View Full Code Here

     */
    public SchedulerWrapper(String servletContextPath, String schedulerConfigurationPath) {
        this.servletContextPath = servletContextPath;
        this.schedulerConfigurationPath = schedulerConfigurationPath;

        SchedulerFactory factory = new StdSchedulerFactory();
        log.info("------- Starting up -----------------------");

        try {
            scheduler = factory.getScheduler();

            scheduler.addSchedulerListener(new AbstractSchedulerListener());
            scheduler.start();
        } catch (SchedulerException e) {
            log.error("Can't initialize SchedulerWrapper: ", e);
View Full Code Here

/*     */
/* 247 */     InitialContext ctx = InitialContextFactory.getInitialContext();
/* 248 */     this.tm = ((TransactionManager)ctx.lookup("java:/TransactionManager"));
/*     */
/* 250 */     createSchema();
/*     */     SchedulerFactory factory;
/*     */     SchedulerFactory factory;
/* 254 */     if (this.properties == null)
/* 255 */       factory = new StdSchedulerFactory();
/*     */     else
/* 257 */       factory = new StdSchedulerFactory(this.properties);
/* 258 */     scheduler = factory.getScheduler();
/*     */
/* 260 */     scheduler.start();
/*     */   }
View Full Code Here

        if (this.scheduler != null)
        {
            throw new UnsupportedOperationException("the scheduler is started already");
        }

        SchedulerFactory schedulerFactory;
        try
        {
            String configFile =
                ConfigResolver.getPropertyValue("deltaspike.scheduler.quartz_config-file", "quartz.properties");
            schedulerFactory = new StdSchedulerFactory(configFile);
        }
        catch (SchedulerException e)
        {
            schedulerFactory = new StdSchedulerFactory();
        }

        try
        {
            this.scheduler = schedulerFactory.getScheduler();
            this.scheduler.getListenerManager().addJobListener(new InjectionAwareJobListener());

            if (!this.scheduler.isStarted())
            {
                String delayedStart =
View Full Code Here

    public void initialize()
        throws InitializationException
    {
        try
        {
            SchedulerFactory factory = new StdSchedulerFactory( properties );

            scheduler = (StdScheduler) factory.getScheduler();
        }
        catch ( SchedulerException e )
        {
            throw new InitializationException( "Cannot create scheduler.", e );
        }
View Full Code Here

TOP

Related Classes of org.quartz.SchedulerFactory

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.