Hi there,

I have an issue when listening to resolved event - my BundleListener
actually doesn't receive the events in the correct order, where the bundle
resolution really happened.
Let's say we have bundle X , which has a Import-Package: org.aPackage , and
a bundle Y , which Export-Package: org.aPackage . I install both (they goes
to installed state), and then try to start X. X and Y can be resolved, but
Y should be resolved first - however, the events are sent in random order.

More precisely, Felix tries to resolve X by calling
StatefulResolver.resolve(), which then delegates to ResolverImpl.resolve()
- this one will detect that Y needs to be resolved first . Y is then
resolved and added to the wireMap. At the end of StatefulResolver
.resolve(), all resolved events are sent by fireResolvedEvents(wireMap) .
Unfortunately, the order in which the wireMap has been filled is lost, so
the order of bundle resolution - I can receive a resolved event for X
before Y or the opposite, randomly.

Is this something that should/could be fixed ? It should be ok to change
the type of the wireMap to keep ordering of inserts. According to the
specifications, "each handler must receive the events in the same order as
the events were posted" .. here the events are not posted in the same order
as they actually happened .. ?

Regards,

-- 
*Thomas Draier*
Chief Software Architect & Co-Founder

T +33 1 44 79 37 86
8 rue du Sentier | 75002 Paris | France
*jahia.com <http://www.jahia.com>*
SKYPE | VCARD <http://www.jahia.com/vcard/DraierThomas.vcf>


> JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.

Reply via email to