Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.16.2
-
Component/s: camel-mina2
-
Labels:None
-
Estimated Complexity:Unknown
Description
The camel-mina2 consumer (org.apache.camel.component.mina2.Mina2Consumer.doStart()) internally start a Mina2 IoAcceptor (org.apache.mina.core.service.IoAcceptor), but the org.apache.camel.component.mina2.Mina2Consumer.doStop() do not invoke acceptor.dispose(true); to release the threadpool started by Mina2.
Current behavior: While stopping the web application, the threadpool started by Mina2 IoAcceptor will not be stopped, so we have several thread which do not properly shutdown.
Current workaround: I create custom CamelShutdownStrategy and collect all Mina2Consumer and invoke Mina2consumer.getAcceptor.dispose(true); OR as an alternative create a dedicated consumer and overwrite the stop method of the Mina2 consumer as seen here: https://github.com/oehf/ipf/commit/12fdde8df7ebbbb7cd9966aadeab3ea3bed8fe75
Suggested bugfix: In org.apache.camel.component.mina2.Mina2Consumer.doShutdown() call the IoAcceptor dispose(true) method after unbind from the address.