Home » quartz-1.6.0 » org » quartz » plugins » [javadoc | source]
org.quartz.plugins
abstract public class: SchedulerPluginWithUserTransactionSupport [javadoc | source]
java.lang.Object
   org.quartz.plugins.SchedulerPluginWithUserTransactionSupport

All Implemented Interfaces:
    SchedulerPlugin

Direct Known Subclasses:
    JobInitializationPluginMultiple, JobInitializationPlugin

Base class for plugins that wish to support having their start and shutdown methods run within a UserTransaction. This is often necessary if using the JobStoreCMT and the plugin interacts with jobs/triggers.

The subclass should implement start(UserTransaction) and shutdown(UserTransaction). The UserTransaction will be non-null if property wrapInUserTransaction is set to true.

For convenience, this base class also provides an initialize() implementation which saves the scheduler and plugin name, as well as getLog() for logging.

Method from org.quartz.plugins.SchedulerPluginWithUserTransactionSupport Summary:
getLog,   getName,   getScheduler,   getWrapInUserTransaction,   initialize,   setWrapInUserTransaction,   shutdown,   shutdown,   start,   start
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.plugins.SchedulerPluginWithUserTransactionSupport Detail:
 protected Log getLog() 
    Get the commons Log for this class.
 protected String getName() 
    Get the name of this plugin. Set as part of initialize().
 protected Scheduler getScheduler() 
    Get this plugin's Scheduler. Set as part of initialize().
 public boolean getWrapInUserTransaction() 
    Wrap the start() and shutdown() methods in a UserTransaction. This is necessary for some plugins if using the JobStoreCMT.
 public  void initialize(String name,
    Scheduler scheduler) throws SchedulerException 
 public  void setWrapInUserTransaction(boolean wrapInUserTransaction) 
    Wrap the start() and shutdown() methods in a UserTransaction. This is necessary for some plugins if using the JobStoreCMT.
 public  void shutdown() 
    Based on the value of wrapInUserTransaction, wraps the call to shutdown(UserTransaction) in a UserTransaction.
 protected  void shutdown(UserTransaction userTransaction) 

    Called in order to inform the SchedulerPlugin that it should free up all of it's resources because the scheduler is shutting down.

    If UserTransaction is not null, the plugin can call setRollbackOnly() on it to signal that the wrapped transaction should rollback.

 public  void start() 
    Based on the value of wrapInUserTransaction, wraps the call to start(UserTransaction) in a UserTransaction.
 protected  void start(UserTransaction userTransaction) 

    Called when the associated Scheduler is started, in order to let the plug-in know it can now make calls into the scheduler if it needs to.

    If UserTransaction is not null, the plugin can call setRollbackOnly() on it to signal that the wrapped transaction should rollback.