Examples of StdSchedulerFactory


Examples of org.quartz.impl.StdSchedulerFactory

     */
    protected SchedulerService getSchedulerService() {
        if (schedulerService == null) {
            ServletContext servletContext = getContext().getServletContext();

            StdSchedulerFactory schedulerFactory = (StdSchedulerFactory)
                servletContext.getAttribute(QuartzInitializerListener.QUARTZ_FACTORY_KEY);

            if (schedulerFactory != null) {
                schedulerService = new SchedulerService(schedulerFactory);
            }
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

            initDatabaseSchema(dataNode, dataMap);

            loadDatabase();

            StdSchedulerFactory schedulerFactory = (StdSchedulerFactory)
                servletContext.getAttribute(QuartzInitializerListener.QUARTZ_FACTORY_KEY);

            SchedulerService schedulerService = new SchedulerService(schedulerFactory);

            loadQuartzJobs(schedulerService);
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

    }

    // Implementation methods
    // -------------------------------------------------------------------------
    protected SchedulerFactory createSchedulerFactory() {
        return new StdSchedulerFactory();
    }
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

     */
    @Override
    public void doInit() throws Exception {
        if (scheduler == null) {
            if (factory == null) {
                factory = new StdSchedulerFactory();
            }
            scheduler = factory.getScheduler();
        }
        scheduler.getContext().setAllowsTransientData(true);
        scheduler.getContext().put(getComponentName(), this);
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

        if (prop != null) {

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        } else {
            // read default props to be able to use a single scheduler per camel context
            // if we need more than one scheduler per context use setScheduler(Scheduler)
            // 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();

            String instName = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            if (instName == null) {
                instName = "scheduler-" + identity;
            } else {
                instName = instName + "-" + identity;
            }
            prop.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, instName);

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        }

        if (LOG.isDebugEnabled()) {
            String name = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            LOG.debug("Creating SchedulerFactory: {} with properties: {}", name, prop);
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

        if (prop != null) {

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        } else {
            // read default props to be able to use a single scheduler per camel context
            // if we need more than one scheduler per context use setScheduler(Scheduler)
            // 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();

            String instName = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            if (instName == null) {
                instName = "scheduler-" + identity;
            } else {
                instName = instName + "-" + identity;
            }
            prop.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, instName);

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        }

        if (LOG.isDebugEnabled()) {
            String name = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            LOG.debug("Creating SchedulerFactory: {} with properties: {}", name, prop);
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

        if (prop != null) {

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        } else {
            // read default props to be able to use a single scheduler per camel context
            // if we need more than one scheduler per context use setScheduler(Scheduler)
            // 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().getManagementName();

            String instName = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            if (instName == null) {
                instName = "scheduler-" + identity;
            } else {
                instName = instName + "-" + identity;
            }
            prop.setProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME, instName);

            // force disabling update checker (will do online check over the internet)
            prop.put("org.quartz.scheduler.skipUpdateCheck", "true");

            answer = new StdSchedulerFactory(prop);
        }

        if (LOG.isDebugEnabled()) {
            String name = prop.getProperty(StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME);
            LOG.debug("Creating SchedulerFactory: {} with properties: {}", name, prop);
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

{
   private Scheduler scheduler_;

   public QuartzSheduler() throws Exception
   {
      SchedulerFactory sf = new StdSchedulerFactory();
      scheduler_ = sf.getScheduler();
      scheduler_.start();
   }
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

        Properties prop = loadProperties();
        if (prop != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Creating SchedulerFactory with properties: " + prop);
            }
            return new StdSchedulerFactory(prop);
        } else {
            return new StdSchedulerFactory();
        }
    }
View Full Code Here

Examples of org.quartz.impl.StdSchedulerFactory

                defaultProperties.put(THREAD_COUNT, "1") ;
            }
            final Scheduler scheduler ;
            try
            {
                scheduler = new StdSchedulerFactory(defaultProperties).getScheduler();
                scheduler.start() ;
            }
            catch (final SchedulerException se)
            {
                throw new SchedulingException("Failed to initialise the scheduler", se) ;
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.