Polish
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -736,27 +736,24 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
|
||||
}
|
||||
// Not using the Quartz startDelayed method since we explicitly want a daemon
|
||||
// thread here, not keeping the JVM alive in case of all other threads ending.
|
||||
Thread schedulerThread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(startupDelay);
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
// simply proceed
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Starting Quartz Scheduler now, after delay of " + startupDelay + " seconds");
|
||||
}
|
||||
try {
|
||||
scheduler.start();
|
||||
}
|
||||
catch (SchedulerException ex) {
|
||||
throw new SchedulingException("Could not start Quartz Scheduler after delay", ex);
|
||||
}
|
||||
Thread schedulerThread = new Thread(() -> {
|
||||
try {
|
||||
TimeUnit.SECONDS.sleep(startupDelay);
|
||||
}
|
||||
};
|
||||
catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
// simply proceed
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Starting Quartz Scheduler now, after delay of " + startupDelay + " seconds");
|
||||
}
|
||||
try {
|
||||
scheduler.start();
|
||||
}
|
||||
catch (SchedulerException ex) {
|
||||
throw new SchedulingException("Could not start Quartz Scheduler after delay", ex);
|
||||
}
|
||||
});
|
||||
schedulerThread.setName("Quartz Scheduler [" + scheduler.getSchedulerName() + "]");
|
||||
schedulerThread.setDaemon(true);
|
||||
schedulerThread.start();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.lang.Nullable;
|
||||
* bean reference. This bean is intended for any kind of usage of FreeMarker
|
||||
* in application code, e.g. for generating email content. For web views,
|
||||
* FreeMarkerConfigurer is used to set up a FreeMarkerConfigurationFactory.
|
||||
*
|
||||
* <p>
|
||||
* The simplest way to use this class is to specify just a "templateLoaderPath";
|
||||
* you do not need any further configuration then. For example, in a web
|
||||
* application context:
|
||||
|
||||
Reference in New Issue
Block a user