We have an application that uses JMS via the Spring driven infrastructure. We also have unit tests that load the Spring container and perform some JMS operations.
After all the tests have run, the unit test executor remains active because not all threads are finished. The contender is the DefaultMessageListenerContainer which issues the log-messages
Still waiting for shutdown of . . . message listener invokers (iteration N)
Our test calls the stop() method for the jmsListenerEndpointRegistry but then the execution stucks in its doShutdown() method. Somehow the field activeInvokerCount never gets the value of 0. I can say for sure that there are no more active message listeners at that time.
There are also many questions about how to stop a JmsContainer on stackoverflow.
To remedy this and prevent an endless loop, it would be helpful if one could specify the max. number of wait cycles when shutting down the container. An emergency stop so to say.
After that number of wait cycles have been executed, the shutdown method would exit the while loop no matter what.
Thank you.
We have an application that uses JMS via the Spring driven infrastructure. We also have unit tests that load the Spring container and perform some JMS operations.
After all the tests have run, the unit test executor remains active because not all threads are finished. The contender is the DefaultMessageListenerContainer which issues the log-messages
Our test calls the
stop()method for thejmsListenerEndpointRegistrybut then the execution stucks in itsdoShutdown()method. Somehow the fieldactiveInvokerCountnever gets the value of 0. I can say for sure that there are no more active message listeners at that time.There are also many questions about how to stop a JmsContainer on stackoverflow.
To remedy this and prevent an endless loop, it would be helpful if one could specify the max. number of wait cycles when shutting down the container. An emergency stop so to say.
After that number of wait cycles have been executed, the shutdown method would exit the while loop no matter what.
Thank you.