Hi Sergiy
I have a jira about that and it's plan for cellar 4.0.2. Basically the trick is
to use a command event instead of a simple event (as I do for producer, etc).
I advise to wait cellar 4.0.2.
RegardsJB
Sent from my Samsung device
-------- Original message --------
From: Sergiy Shyrkov <[email protected]>
Date: 18/07/2016 18:10 (GMT+01:00)
To: [email protected]
Subject: Karaf Cellar - Overriding BundleEventHandler
Hello,
I would like to override or extend the functionality of the:
org.apache.karaf.cellar.bundle.BundleEventHandler
in order to implement "synchronous" handling in our code as we expect
bundle operations to complete before the call returns. I was already
asking in the list about implementing synchronous behaviour for bundle
operations, but have not got any hints so far.
I am able to register my own handler implementation for the
ClusterBundleEvent.class and disable via org.apache.karaf.cellar.node.cfg
the original one.
But my issue is that the EventHandlerServiceRegistry stores only one
handler instance per event type. So whenever my instance is registered
first, the registration of the disabled BundleEventHandler overwrites it
in the registry.
Would someone have any hints on how to solve this "issue" without forking
the code base of Cellar?
Thank you in advance for any clues!
Kind regards
Sergiy
--
Sergiy Shyrkov
Software Architect
Jahia Solutions Group SA
http://www.jahia.com