felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frizz <frizzthe...@googlemail.com>
Subject Order in which SynchronousBundleListeners are called
Date Fri, 20 Sep 2013 09:42:14 GMT
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.

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