Class CleanupDatabaseJob

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasTransactionAttribute, IConfigurable, IScopeProvider, NameAware, ConfigurableLifecycle, IJob, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class CleanupDatabaseJob extends AbstractJobDef
Frank!Framework job to cleanup the IBISSTORE and IBISLOCK tables. Find all MessageLogs and Lockers in the current configuration and removes database entries which have surpassed their corresponding
invalid reference
MessageLog's ExpiryDateField
.
  • Constructor Details

    • CleanupDatabaseJob

      public CleanupDatabaseJob()
  • Method Details

    • beforeExecuteJob

      public boolean beforeExecuteJob()
      Description copied from class: AbstractJobDef
      Called before executeJob to prepare resources for executeJob method. Returns false if job does not need to run
      Overrides:
      beforeExecuteJob in class AbstractJobDef
    • execute

      public void execute()
      Description copied from class: AbstractJobDef
      Is wrapped around a Locker and exceptions will be managed automatically.
      Specified by:
      execute in class AbstractJobDef
    • getAllLockerDatasourceNames

      protected Set<String> getAllLockerDatasourceNames()
      Locate all Lockers, and find out which datasources are used.
      Returns:
      distinct list of all datasourceNames used by lockers
    • getAllMessageLogs

      protected List<org.frankframework.scheduler.job.CleanupDatabaseJob.MessageLogObject> getAllMessageLogs()
    • setQueryTimeout

      public void setQueryTimeout(int i)
      The number of seconds the database driver will wait for a statement to execute. If the limit is exceeded, a TimeoutException is thrown. 0 means no timeout
      Default value
      0
    • getCleanUpIbisstoreQuery

      public String getCleanUpIbisstoreQuery(String tableName, String keyField, String typeField, String expiryDateField, int maxRows, Dbms dbmsName)