In BaseUIMAAsynchronousEngine_impl a shutdown hook gets added to the Runtime which stops the AsynchronousEngine. This makes it impossible for consumers to correclty implement a graceful shutdown behaviour on JVM shutdow.
For applications running on Kubernetes the expectation is that on "SIGTERM" the application completes running requests and then exits. SIGTERM also triggers JVM shutdown hooks, the AS shutdown hooks prevent running requests from completing (because the AS Engine is stopped).
It also seems like these hooks are never removed which might lead to issues if a lot of AS Engines are initialized.
It would be benefitial to make these shutdown hooks optional or remove them outright.