Skip to content

Commit

Permalink
fix(bitronix): fix Bitronix channel closed due to
Browse files Browse the repository at this point in the history
threadPoolExecutor.shutdownNow() that is too brutal
See scalar-labs/btm#45 for explainations...
  • Loading branch information
educhastenier authored and bonita-ci committed Nov 10, 2016
1 parent e27741b commit 8c8f1e6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class MessagesHandlingService implements TenantLifecycleService {
private SessionAccessor sessionAccessor;

public MessagesHandlingService(EventInstanceService eventInstanceService, WorkService workService, TechnicalLoggerService loggerService,
LockService lockService, Long tenantId, UserTransactionService userTransactionService, SessionAccessor sessionAccessor) {
LockService lockService, Long tenantId, UserTransactionService userTransactionService, SessionAccessor sessionAccessor) {
this.eventInstanceService = eventInstanceService;
this.workService = workService;
this.loggerService = loggerService;
Expand Down Expand Up @@ -104,7 +104,7 @@ public void stop() throws SBonitaException {
return;
}
log(TechnicalLogSeverity.INFO, "Stopping thread that handle messages...");
threadPoolExecutor.shutdownNow();
threadPoolExecutor.shutdown();
try {
boolean termination = threadPoolExecutor.awaitTermination(5000, TimeUnit.MILLISECONDS);
if (!termination) {
Expand Down

0 comments on commit 8c8f1e6

Please sign in to comment.