i am running
- SerivceMix 6.1.2
- Camel 2.16.3
- PaxExam 4.10
- ActiveMQ 5.12.3 embedded in ServiceMix as a feature by @Configure to simulate the external one
When i test my Camel routes having AMQ endpoints and the test method finishes, the AMQ is shutdown earlier than the Camel routes. Causing the routes endpoints throwing a lot of lost connection exceptions, especially when there are inflights. The start level of the AMQ is much lower than my routes. How can i ensure the shutdown sequence: - route, - amq, - servicemix ?
Specify to have your Camel route (or test bundle) depend on the ActiveMQ broker service. When the bundles are being shutdown, they will be shutdown in reverse dependency order and the broker (which doesn't depend on any of your coded services) should shutdown towards the end.
Updated:
This allows OSGi to deterministically configure the proper startup and shutdown based on explicit dependency vs arbitrary (what you have now) or a number-ordered convention.