environment.servlets().setInitParameter("thread-pool-size", sundialConfiguration.getThreadPoolSize()); environment.servlets().setInitParameter("shutdown-on-unload", sundialConfiguration.getPerformShutdown()); environment.servlets().setInitParameter("wait-on-shutdown", sundialConfiguration.getWaitOnShutdown()); environment.servlets().setInitParameter("start-delay-seconds", sundialConfiguration.getStartDelay()); environment.servlets().setInitParameter("start-scheduler-on-load", sundialConfiguration.getStartOnLoad()); environment.servlets().setInitParameter("global-lock-on-load", sundialConfiguration.getGlobalLockOnLoad()); environment.servlets().setInitParameter("global-lock-on-load", sundialConfiguration.getGlobalLockOnLoad()); environment.servlets().setInitParameter("annotated-jobs-package-name", sundialConfiguration.getAnnotatedJobsPackageName());
@Override public void run(T configuration, Environment environment) throws Exception { // disable annotation scanning environment.servlets().setInitParameter(CONFIG_BASE_PACKAGES, "none"); // set the config attribute environment.getApplicationContext().setAttribute(REWRITE_CONFIG_KEY, narrow(configuration)); environment.servlets().addServletListeners(new RewriteServletRequestListener(), new RewriteServletContextListener()); // load the filter environment.servlets().addFilter("rewrite", RewriteFilter.class) .addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), false, "/*"); } }