Hi there,

I made a SynchronousBundleListener listening for bundle 0 to detect when
the container shuts down, because I want to do some cleanup stuff before.

In theory this works.

Problem is: There are lots of other bundles that use the same "technique"
(like Camel, Blueprint, etc.). And their SynchronousBundleListeners are
called before mine is called.

At the time my SynchronousBundleListener is called a lot of the
functionality that I need is already gone.

It seems the only way to "control" the order in which
SynchronousBundleListenes are called is via the bundle start level (e.g.
etc/startup.properties).

1) I would have expected that SynchronousBundleListenes are called in LIFO,
like bundles with a high bundle start level are removed first when then
container shuts down. But that's not the case.

Imho that's a bug. What do you think?


2) It would be nice to have something like in Apache CXF: addBefore() and
addAfter() to control the order in which SynchronousBundleListenes are
called.

cheers,
F.

Reply via email to