Cool, Claus, thanks for the clarification! Will commit my pending fixes in a few hours.
On Tue, Feb 12, 2013 at 2:49 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > On Tue, Feb 12, 2013 at 2:38 PM, Raul Kripalani <r...@evosent.com> wrote: > > Hi, > > > > 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*. > > > > Yeah shutdown should check the state as we do in stop etc. > > But usually calling shutting down 2 times should really be idempotent, > but i guess the seda endpoint have the issue you found. > > > > 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. > > > > [1] > > > http://camel.465427.n5.nabble.com/VM-Queues-Disconnected-after-Karaf-Bundle-Update-tp5727205.html > > > > Cheers, > > > > *Raúl Kripalani* > > Apache Camel Committer > > Enterprise Architect, Program Manager, Open Source Integration specialist > > http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani > > http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk> > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: cib...@redhat.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen >