JobStoreCMT (Quartz Parent POM 2.0.1 API)
From Quartz Java
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.quartz.impl.jdbcjobstore Class JobStoreCMT
java.lang.Objectorg.quartz.impl.jdbcjobstore.JobStoreSupport
org.quartz.impl.jdbcjobstore.JobStoreCMT
- All Implemented Interfaces:
- Constants, org.quartz.spi.JobStore
public class JobStoreCMT
- extends JobStoreSupport
JobStoreCMT is meant to be used in an application-server
environment that provides container-managed-transactions. No commit /
rollback will be1 handled by this class.
If you need commit / rollback, use JobStoreTX
instead.
- Author:
- Jeffrey Wescott, James House, Srinivas Venkatarangaiah
Nested Class Summary
Nested classes/interfaces inherited from class org.quartz.impl.jdbcjobstore.JobStoreSupport
JobStoreSupport.RecoverMisfiredJobsResult, JobStoreSupport.TransactionCallback, JobStoreSupport.VoidTransactionCallback
Field Summary
protected boolean
dontSetNonManagedTXConnectionAutoCommitFalse
protected String
nonManagedTxDsName
protected boolean
setTxIsolationLevelReadCommitted
Fields inherited from class org.quartz.impl.jdbcjobstore.JobStoreSupport
calendarCache, delegateClass, delegateClassName, delegateInitString, dsName, firstCheckIn, instanceId, instanceName, lastCheckin, LOCK_CALENDAR_ACCESS, LOCK_JOB_ACCESS, LOCK_MISFIRE_ACCESS, LOCK_STATE_ACCESS, LOCK_TRIGGER_ACCESS, maxToRecoverAtATime, sigChangeForTxCompletion, tablePrefix, useProperties
Constructor Summary
JobStoreCMT()
Method Summary
protected Object
executeInLock(String lockName,
JobStoreSupport.TransactionCallback txCallback)
Execute the given callback having optionally acquired the given lock.
protected Connection
getNonManagedTXConnection()
String
getNonManagedTXDataSource()
Get the name of the DataSource that should be used for
performing database functions.
void
initialize(org.quartz.spi.ClassLoadHelper loadHelper,
org.quartz.spi.SchedulerSignaler signaler)
Called by the QuartzScheduler before the JobStore is
used, in order to give it a chance to initialize.
boolean
isDontSetNonManagedTXConnectionAutoCommitFalse()
boolean
isTxIsolationLevelReadCommitted()
void
setDontSetNonManagedTXConnectionAutoCommitFalse(boolean b)
Don't call set autocommit(false) on connections obtained from the
DataSource.
void
setNonManagedTXDataSource(String nonManagedTxDsName)
Set the name of the DataSource that should be used for
performing database functions.
void
setTxIsolationLevelReadCommitted(boolean b)
Set the transaction isolation level of DB connections to sequential.
void
shutdown()
Called by the QuartzScheduler to inform the JobStore that
it should free up all of it's resources because the scheduler is
shutting down.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
nonManagedTxDsName
protected String nonManagedTxDsName
dontSetNonManagedTXConnectionAutoCommitFalse
protected boolean dontSetNonManagedTXConnectionAutoCommitFalse
setTxIsolationLevelReadCommitted
protected boolean setTxIsolationLevelReadCommitted
Constructor Detail
JobStoreCMT
public JobStoreCMT()
Method Detail
setNonManagedTXDataSource
public void setNonManagedTXDataSource(String nonManagedTxDsName)
Set the name of the DataSource that should be used for
performing database functions.
getNonManagedTXDataSource
public String getNonManagedTXDataSource()
Get the name of the DataSource that should be used for
performing database functions.
isDontSetNonManagedTXConnectionAutoCommitFalse
public boolean isDontSetNonManagedTXConnectionAutoCommitFalse()
setDontSetNonManagedTXConnectionAutoCommitFalse
public void setDontSetNonManagedTXConnectionAutoCommitFalse(boolean b)
- Don't call set autocommit(false) on connections obtained from the
DataSource. This can be helpfull in a few situations, such as if you
have a driver that complains if it is called when it is already off.
- Parameters:
b -
isTxIsolationLevelReadCommitted
public boolean isTxIsolationLevelReadCommitted()
setTxIsolationLevelReadCommitted
public void setTxIsolationLevelReadCommitted(boolean b)
- Set the transaction isolation level of DB connections to sequential.
- Parameters:
b -
initialize
public void initialize(org.quartz.spi.ClassLoadHelper loadHelper,
org.quartz.spi.SchedulerSignaler signaler)
throws SchedulerConfigException
- Description copied from class:
JobStoreSupport
Called by the QuartzScheduler before the JobStore is
used, in order to give it a chance to initialize.
- Specified by:
initialize in interface org.quartz.spi.JobStore- Overrides:
initialize in class JobStoreSupport
- Throws:
SchedulerConfigException
shutdown
public void shutdown()
- Description copied from class:
JobStoreSupport
Called by the QuartzScheduler to inform the JobStore that
it should free up all of it's resources because the scheduler is
shutting down.
- Specified by:
shutdown in interface org.quartz.spi.JobStore- Overrides:
shutdown in class JobStoreSupport
getNonManagedTXConnection
protected Connection getNonManagedTXConnection()
throws JobPersistenceException
- Specified by:
getNonManagedTXConnection in class JobStoreSupport
- Throws:
JobPersistenceException
executeInLock
protected Object executeInLock(String lockName,
JobStoreSupport.TransactionCallback txCallback)
throws JobPersistenceException
- Execute the given callback having optionally acquired the given lock.
Because CMT assumes that the connection is already part of a managed
transaction, it does not attempt to commit or rollback the
enclosing transaction.
- Specified by:
executeInLock in class JobStoreSupport
- Parameters:
lockName - The name of the lock to acquire, for example
"TRIGGER_ACCESS". If null, then no lock is acquired, but the
txCallback is still executed in a transaction.
- Throws:
JobPersistenceException- See Also:
JobStoreSupport.executeInNonManagedTXLock(String, TransactionCallback),
JobStoreSupport.executeInLock(String, TransactionCallback),
JobStoreSupport.getNonManagedTXConnection(),
JobStoreSupport.getConnection()
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright 2001-2011, Terracotta, Inc.