[
https://issues.apache.org/jira/browse/SM-4123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066537#comment-17066537
]
Ephemeris Lappis commented on SM-4123:
--------------------------------------
Almost all of our Camel bundles (more than 150) rely on these EventNotifier
classes, that catch all the events for administrative tasks (exchange
filtering, logs, history, correlation, etc.) and it would be difficult to
change this design.
For now, we have an existent service that is referenced by all our Camel
bundle, and we use it as a factory to instantiate an event notifier in each
bundle context as a simple bean. This way we have still enough decoupling
between the notifier implementation and the instrumented bundles that must be
refreshed when a new version of the service is deployed.
This is not perfect, but it works.
> Unexpected automatic EventNotifier attachment to CamelContexts
> --------------------------------------------------------------
>
> Key: SM-4123
> URL: https://issues.apache.org/jira/browse/SM-4123
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-camel
> Affects Versions: 7.0.x
> Environment: Same behavior on :
> * Camel 2.16.5 / SMX 7.0.1
> * Camel 2.17.0.redhat-630187 on Fuse fabric8-karaf-1.2.0.redhat-630187
> Reporter: Ephemeris Lappis
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> We try to provide a shared EventNotifier as an exposed OSGi service from a
> bundle. This bundle has a simple Java class that implements the EventNotifier
> interface, and a blueprint to expose it as a service.
> Other bundles are designed with a simple blueprint with a reference to the
> previous service, and a CamelContext and its routes.
> Two issues
> * Wwith or without a reference to the service in the blueprint, all the
> CamelContext are attached to the EventNotifier.
> * All other EventNotifier that may be instantiated by a bundle (bean in the
> blueprint), are ignored, not registered, and they don't receive events.
> It seems that the simple presence of the EventNotifier "as a service"
> registers it automatically in all the deployed CamelContext.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)