Home » quartz-1.6.0 » org » quartz » impl » [javadoc | source]
public class: StdSchedulerFactory [javadoc | source]

All Implemented Interfaces:

An implementation of org.quartz.SchedulerFactory that does all of its work of creating a QuartzScheduler instance based on the contenents of a Properties file.

By default a properties file named "quartz.properties" is loaded from the 'current working directory'. If that fails, then the "quartz.properties" file located (as a resource) in the org/quartz package is loaded. If you wish to use a file other than these defaults, you must define the system property 'org.quartz.properties' to point to the file you want.

See the sample properties files that are distributed with Quartz for information about the various settings available within the file.

Alternatively, you can explicitly initialize the factory by calling one of the initialize(xx) methods before calling getScheduler().

Instances of the specified org.quartz.spi.JobStore , org.quartz.spi.ThreadPool , classes will be created by name, and then any additional properties specified for them in the config file will be set on the instance by calling an equivalent 'set' method. For example if the properties file contains the property 'org.quartz.jobStore.myProp = 10' then after the JobStore class has been instantiated, the method 'setMyProp()' will be called on it. Type conversion to primitive Java types (int, long, float, double, boolean, and String) are performed before calling the property's setter method.

Field Summary
public static final  String PROPERTIES_FILE     
public static final  String PROP_SCHED_INSTANCE_NAME     
public static final  String PROP_SCHED_INSTANCE_ID     
public static final  String PROP_SCHED_INSTANCE_ID_GENERATOR_PREFIX     
public static final  String PROP_SCHED_INSTANCE_ID_GENERATOR_CLASS     
public static final  String PROP_SCHED_THREAD_NAME     
public static final  String PROP_SCHED_JMX_EXPORT     
public static final  String PROP_SCHED_JMX_PROXY     
public static final  String PROP_SCHED_JMX_PROXY_CLASS     
public static final  String PROP_SCHED_JMX_OBJECT_NAME     
public static final  String PROP_SCHED_RMI_EXPORT     
public static final  String PROP_SCHED_RMI_PROXY     
public static final  String PROP_SCHED_RMI_HOST     
public static final  String PROP_SCHED_RMI_PORT     
public static final  String PROP_SCHED_RMI_SERVER_PORT     
public static final  String PROP_SCHED_RMI_CREATE_REGISTRY     
public static final  String PROP_SCHED_RMI_BIND_NAME     
public static final  String PROP_SCHED_WRAP_JOB_IN_USER_TX     
public static final  String PROP_SCHED_USER_TX_URL     
public static final  String PROP_SCHED_IDLE_WAIT_TIME     
public static final  String PROP_SCHED_DB_FAILURE_RETRY_INTERVAL     
public static final  String PROP_SCHED_MAKE_SCHEDULER_THREAD_DAEMON     
public static final  String PROP_SCHED_CLASS_LOAD_HELPER_CLASS     
public static final  String PROP_SCHED_JOB_FACTORY_CLASS     
public static final  String PROP_SCHED_JOB_FACTORY_PREFIX     
public static final  String PROP_SCHED_CONTEXT_PREFIX     
public static final  String PROP_THREAD_POOL_PREFIX     
public static final  String PROP_THREAD_POOL_CLASS     
public static final  String PROP_JOB_STORE_PREFIX     
public static final  String PROP_JOB_STORE_LOCK_HANDLER_PREFIX     
public static final  String PROP_JOB_STORE_LOCK_HANDLER_CLASS     
public static final  String PROP_TABLE_PREFIX     
public static final  String PROP_JOB_STORE_CLASS     
public static final  String PROP_JOB_STORE_USE_PROP     
public static final  String PROP_DATASOURCE_PREFIX     
public static final  String PROP_CONNECTION_PROVIDER_CLASS     
public static final  String PROP_DATASOURCE_DRIVER     
public static final  String PROP_DATASOURCE_URL     
public static final  String PROP_DATASOURCE_USER     
public static final  String PROP_DATASOURCE_PASSWORD     
public static final  String PROP_DATASOURCE_MAX_CONNECTIONS     
public static final  String PROP_DATASOURCE_VALIDATION_QUERY     
public static final  String PROP_DATASOURCE_JNDI_URL     
public static final  String PROP_DATASOURCE_JNDI_ALWAYS_LOOKUP     
public static final  String PROP_DATASOURCE_JNDI_INITIAL     
public static final  String PROP_DATASOURCE_JNDI_PROVDER     
public static final  String PROP_DATASOURCE_JNDI_PRINCIPAL     
public static final  String PROP_DATASOURCE_JNDI_CREDENTIALS     
public static final  String PROP_PLUGIN_PREFIX     
public static final  String PROP_PLUGIN_CLASS     
public static final  String PROP_JOB_LISTENER_PREFIX     
public static final  String PROP_TRIGGER_LISTENER_PREFIX     
public static final  String PROP_LISTENER_CLASS     
public static final  String DEFAULT_INSTANCE_ID     
public static final  String AUTO_GENERATE_INSTANCE_ID     
 public StdSchedulerFactory() 
 public StdSchedulerFactory(Properties props) throws SchedulerException 
 public StdSchedulerFactory(String fileName) throws SchedulerException 
Method from org.quartz.impl.StdSchedulerFactory Summary:
getAllSchedulers,   getDefaultScheduler,   getLog,   getScheduler,   getScheduler,   initialize,   initialize,   initialize,   initialize,   instantiate
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.impl.StdSchedulerFactory Detail:
 public Collection getAllSchedulers() throws SchedulerException 

    Returns a handle to all known Schedulers (made by any StdSchedulerFactory instance.).

 public static Scheduler getDefaultScheduler() throws SchedulerException 

    Returns a handle to the default Scheduler, creating it if it does not yet exist.

 public Log getLog() 
 public Scheduler getScheduler() throws SchedulerException 

    Returns a handle to the Scheduler produced by this factory.

    If one of the initialize methods has not be previously called, then the default (no-arg) initialize() method will be called by this method.

 public Scheduler getScheduler(String schedName) throws SchedulerException 

    Returns a handle to the Scheduler with the given name, if it exists (if it has already been instantiated).

 public  void initialize() throws SchedulerException 

    Initialize the org.quartz.SchedulerFactory with the contents of a Properties file and overriding System properties.

    By default a properties file named "quartz.properties" is loaded from the 'current working directory'. If that fails, then the "quartz.properties" file located (as a resource) in the org/quartz package is loaded. If you wish to use a file other than these defaults, you must define the system property 'org.quartz.properties' to point to the file you want.

    System properties (environment variables, and -D definitions on the command-line when running the JVM) override any properties in the loaded file. For this reason, you may want to use a different initialize() method if your application security policy prohibits access to java.lang.System#getProperties() .

 public  void initialize(String filename) throws SchedulerException 
 public  void initialize(InputStream propertiesStream) throws SchedulerException 
 public  void initialize(Properties props) throws SchedulerException 
 protected Scheduler instantiate(QuartzSchedulerResources rsrcs,
    QuartzScheduler qs)