Search in sources :

Example 1 with LoggingJobListener

use of com.helger.schedule.quartz.listener.LoggingJobListener in project phoss-directory by phax.

the class AppWebAppListener method initGlobalSettings.

@Override
protected void initGlobalSettings() {
    // Internal stuff:
    VendorInfo.setVendorName("Philip Helger");
    VendorInfo.setVendorURL("http://www.helger.com");
    VendorInfo.setVendorEmail("pd@helger.com");
    VendorInfo.setVendorLocation("Vienna, Austria");
    VendorInfo.setInceptionYear(2015);
    if (PDServerConfiguration.isForceRoot()) {
        // Enforce an empty context path according to the specs!
        ServletContextPathHolder.setCustomContextPath("");
    }
    if (GlobalDebug.isProductionMode())
        ValueEnforcer.setEnabled(false);
    // By disabling these settings, less audits are created hence less calls are
    // blocking
    RequestTrackerSettings.setLongRunningRequestsCheckEnabled(false);
    RequestTrackerSettings.setParallelRunningRequestsCheckEnabled(false);
    RequestParameterManager.getInstance().setParameterHandler(new RequestParameterHandlerURLPathNamed());
    AppInternalErrorHandler.doSetup();
    final ConfigurationFileManager aCfgMgr = ConfigurationFileManager.getInstance();
    aCfgMgr.registerConfigurationFile(new ConfigurationFile(new ClassPathResource("log4j2.xml")).setDescription("log4j configuration file").setSyntaxHighlightLanguage(EConfigurationFileSyntax.XML));
    aCfgMgr.registerAll(PDServerConfiguration.getConfig());
    // Job scheduling etc
    if (GlobalDebug.isDebugMode())
        GlobalQuartzScheduler.getInstance().addJobListener(new LoggingJobListener());
}
Also used : ConfigurationFileManager(com.helger.photon.core.configfile.ConfigurationFileManager) RequestParameterHandlerURLPathNamed(com.helger.photon.core.requestparam.RequestParameterHandlerURLPathNamed) ConfigurationFile(com.helger.photon.core.configfile.ConfigurationFile) LoggingJobListener(com.helger.schedule.quartz.listener.LoggingJobListener) ClassPathResource(com.helger.commons.io.resource.ClassPathResource)

Aggregations

ClassPathResource (com.helger.commons.io.resource.ClassPathResource)1 ConfigurationFile (com.helger.photon.core.configfile.ConfigurationFile)1 ConfigurationFileManager (com.helger.photon.core.configfile.ConfigurationFileManager)1 RequestParameterHandlerURLPathNamed (com.helger.photon.core.requestparam.RequestParameterHandlerURLPathNamed)1 LoggingJobListener (com.helger.schedule.quartz.listener.LoggingJobListener)1