[
https://issues.apache.org/jira/browse/CAMEL-7091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856827#comment-13856827
]
Henrique Viecili commented on CAMEL-7091:
-----------------------------------------
Unfortunately I won't be able to share the code because it belongs to the
company I used to work for (left 2 days ago).
>From what I remember, it's a simple EventNotifier that accepts
>AbstractExchangeEvent's and logs the exchange details once the events are
>fired.
The blueprint in bundle2 is quite simple as well. It imports the EventNotifier
(1st line after <blueprint ...> ) and also imports a JMS ConnectionFactory used
to create a Camel JmsComponent used in the camel routes. The CamelContext
itself has a global onException declaration and a couple of 'queue-forwarding'
routes (from Q.A -> log -> to Q.B )
It works if I change:
<reference id="commonLogEventNotifier"
interface="com.event.logger.CommonLogEventNotifier" />
to
<bean id="commonLogEventNotifier"
class="com.event.logger.CommonLogEventNotifierImpl" />
(but then, it doesn't fit the goal we wanted to achieve)
> EventNotifiers don't work under Blueprint as a referenced service
> -----------------------------------------------------------------
>
> Key: CAMEL-7091
> URL: https://issues.apache.org/jira/browse/CAMEL-7091
> Project: Camel
> Issue Type: Bug
> Components: camel-blueprint, camel-core
> Affects Versions: 2.10.0
> Environment: JBoss Fuse 6.0.0 / Karaf 2.3.0
> Reporter: Henrique Viecili
> Assignee: Willem Jiang
> Labels: blueprint, events
>
> I'm facing a similar issue to what is describer at CAMEL-5299, this time the
> same behaviour happen when using the EventNotifier from another bundle's
> exported service.
> Bundle 1 (exposes an EventNotifier):
> Export-Service =
> com.event.logger.CommonLogEventNotifier
> blueprint.xml:
> <service id="commonLogEventNotifier"
> interface="com.event.logger.CommonLogEventNotifier">
> <bean class="com.event.logger.CommonLogEventNotifierImpl">
> </bean>
> </service>
> Bundle 2 (uses the EventNotifier)
> Import-Service =
> com.event.logger.CommonLogEventNotifier;multiple:=false
> blueprint.xml:
> <reference id="commonLogEventNotifier"
> interface="com.event.logger.CommonLogEventNotifier" />
> The EventNotifier class definition is:
> public class CommonLogEventNotifierImpl extends EventNotifierSupport
> implements EventNotifier, com.event.logger.CommonLogEventNotifier
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)