public class

LocalDataSourceJobStore

extends JobStoreCMT
java.lang.Object
   ↳ JobStoreCMT
     ↳ org.springframework.scheduling.quartz.LocalDataSourceJobStore

Class Overview

Subclass of Quartz's JobStoreCMT class that delegates to a Spring-managed DataSource instead of using a Quartz-managed connection pool. This JobStore will be used if SchedulerFactoryBean's "dataSource" property is set.

Supports both transactional and non-transactional DataSource access. With a non-XA DataSource and local Spring transactions, a single DataSource argument is sufficient. In case of an XA DataSource and global JTA transactions, SchedulerFactoryBean's "nonTransactionalDataSource" property should be set, passing in a non-XA DataSource that will not participate in global transactions.

Operations performed by this JobStore will properly participate in any kind of Spring-managed transaction, as it uses Spring's DataSourceUtils connection handling methods that are aware of a current transaction.

Note that all Quartz Scheduler operations that affect the persistent job store should usually be performed within active transactions, as they assume to get proper locks etc.

Summary

Constants
String NON_TX_DATA_SOURCE_PREFIX Name used for the non-transactional ConnectionProvider for Quartz.
String TX_DATA_SOURCE_PREFIX Name used for the transactional ConnectionProvider for Quartz.
Public Constructors
LocalDataSourceJobStore()
Public Methods
void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler)
Protected Methods
void closeConnection(Connection con)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String NON_TX_DATA_SOURCE_PREFIX

Name used for the non-transactional ConnectionProvider for Quartz. This provider will delegate to the local Spring-managed DataSource.

See Also
Constant Value: "springNonTxDataSource."

public static final String TX_DATA_SOURCE_PREFIX

Name used for the transactional ConnectionProvider for Quartz. This provider will delegate to the local Spring-managed DataSource.

See Also
Constant Value: "springTxDataSource."

Public Constructors

public LocalDataSourceJobStore ()

Public Methods

public void initialize (ClassLoadHelper loadHelper, SchedulerSignaler signaler)

Throws
SchedulerConfigException

Protected Methods

protected void closeConnection (Connection con)