org.olat.core.commons.scheduler
Class JobWithDB

java.lang.Object
  extended by org.springframework.scheduling.quartz.QuartzJobBean
      extended by org.olat.core.commons.scheduler.JobWithDB
All Implemented Interfaces:
org.quartz.Job
Direct Known Subclasses:
ChangePresenceJob, DummyJob, DumpJMXJob, EmailNotificationJob, I18nTranslationStatusGeneratorJob, LDAPUserSynchronizerJob, SchedulerTestJob, SchedulerTestJobWithDB, SystemRegistrationJob, SystemRegistrationJobStarter, UpdateStatisticsJob

public abstract class JobWithDB
extends org.springframework.scheduling.quartz.QuartzJobBean

Description:

This abstract class implements the regular Quartz job interface and allows the user to implement an alternative execute method. This abstract class should be used whenever the job does some hibernate calls using the DBFactory.

This abstract class guarantees that after executing the job the database handle is being released properly.

If unsure, use this Job! Even if you don't use extra DB calls, some of the manager you call in your code are likely to do some database calls!

Initial Date: 27.04.2007

Author:
Florian Gnägi, frentix GmbH, http://www.frentix.com

Constructor Summary
JobWithDB()
           
 
Method Summary
abstract  void executeWithDB(org.quartz.JobExecutionContext arg0)
          Implement this execute method instead of the regular execute method if your job does some database stuff using the database factory.
 
Methods inherited from class org.springframework.scheduling.quartz.QuartzJobBean
execute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobWithDB

public JobWithDB()
Method Detail

executeWithDB

public abstract void executeWithDB(org.quartz.JobExecutionContext arg0)
                            throws org.quartz.JobExecutionException
Implement this execute method instead of the regular execute method if your job does some database stuff using the database factory.

Parameters:
arg0 - The JobExecutionContext
Throws:
org.quartz.JobExecutionException