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();
|
private final Lock scriptsLock = new ReentrantLock();
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
requestTemplate.init();
|
requestTemplate.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
public void destroy() {
|
@Override
|
||||||
|
public void stop() {
|
||||||
super.stop();
|
super.stop();
|
||||||
if (requestTemplate != null) {
|
if (requestTemplate != null) {
|
||||||
requestTemplate.stop();
|
requestTemplate.stop();
|
||||||
}
|
}
|
||||||
|
callbackExecutor.shutdownNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -104,6 +104,7 @@ public class NashornJsInvokeService extends AbstractJsInvokeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
jsExecutor = MoreExecutors.listeningDecorator(Executors.newWorkStealingPool(jsExecutorThreadPoolSize));
|
jsExecutor = MoreExecutors.listeningDecorator(Executors.newWorkStealingPool(jsExecutorThreadPoolSize));
|
||||||
@ -122,6 +123,7 @@ public class NashornJsInvokeService extends AbstractJsInvokeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
super.stop();
|
super.stop();
|
||||||
if (monitorExecutorService != null) {
|
if (monitorExecutorService != null) {
|
||||||
|
|||||||
@ -119,6 +119,7 @@ public class DefaultTbelInvokeService extends AbstractScriptInvokeService implem
|
|||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
OptimizerFactory.setDefaultOptimizer(OptimizerFactory.SAFE_REFLECTIVE);
|
OptimizerFactory.setDefaultOptimizer(OptimizerFactory.SAFE_REFLECTIVE);
|
||||||
@ -142,7 +143,9 @@ public class DefaultTbelInvokeService extends AbstractScriptInvokeService implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PreDestroy
|
@PreDestroy
|
||||||
public void destroy() {
|
@Override
|
||||||
|
public void stop() {
|
||||||
|
super.stop();
|
||||||
if (executor != null) {
|
if (executor != null) {
|
||||||
executor.shutdownNow();
|
executor.shutdownNow();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user