camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject Why do we allow executing service shutdown logic twice (or more times)?
Date Tue, 12 Feb 2013 13:38:07 GMT

I'm debugging why a pair of VM producer-consumer become disconnected in an
OSGi environment when the consumer bundle is restarted. See [1].

I can trace it back to the SedaEndpoint being shutdown twice: 1) when the
route is shutdown and 2) when the context is shutdown.

Why doesn't ServiceSupport#shutdown return immediately if the service has
already been shutdown? (we do this for start, stop, etc.). Strangely, we
only handle the case if the service *is shutting down*.

Anyway, due to duplicate execution of shutdown logic, the counter of Queue
References is decremented twice, "tricking" the component into thinking
that the producer has also disappeared and removing the queue altogether.



*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist | | twitter: @raulvk <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message