Shutdown callback executor for RemoteJsInvokeService. Call shutdown timeoutExecutorService from AbstractScriptInvokeService
This commit is contained in:
parent
ebdcda773c
commit
368455119b
@ -109,17 +109,20 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||
private final Lock scriptsLock = new ReentrantLock();
|
||||
|
||||
@PostConstruct
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
requestTemplate.init();
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void destroy() {
|
||||
@Override
|
||||
public void stop() {
|
||||
super.stop();
|
||||
if (requestTemplate != null) {
|
||||
requestTemplate.stop();
|
||||
}
|
||||
callbackExecutor.shutdownNow();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -104,6 +104,7 @@ public class NashornJsInvokeService extends AbstractJsInvokeService {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
jsExecutor = MoreExecutors.listeningDecorator(Executors.newWorkStealingPool(jsExecutorThreadPoolSize));
|
||||
@ -122,6 +123,7 @@ public class NashornJsInvokeService extends AbstractJsInvokeService {
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
@Override
|
||||
public void stop() {
|
||||
super.stop();
|
||||
if (monitorExecutorService != null) {
|
||||
|
||||
@ -119,6 +119,7 @@ public class DefaultTbelInvokeService extends AbstractScriptInvokeService implem
|
||||
|
||||
@SneakyThrows
|
||||
@PostConstruct
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
OptimizerFactory.setDefaultOptimizer(OptimizerFactory.SAFE_REFLECTIVE);
|
||||
@ -142,7 +143,9 @@ public class DefaultTbelInvokeService extends AbstractScriptInvokeService implem
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void destroy() {
|
||||
@Override
|
||||
public void stop() {
|
||||
super.stop();
|
||||
if (executor != null) {
|
||||
executor.shutdownNow();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user