You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Henrique Viecili <vi...@gmail.com> on 2013/12/20 08:53:59 UTC

EventNotifiers not working in OSGi (as imported service)

I am looking at https://issues.apache.org/jira/browse/CAMEL-5299 and it
says the bug is fixed but I'm facing the same kind of issue when creating
the EventNotifier from another bundle's exported service.

*Bundle 1 (exposes an EventNotifierFactory):*
Export-Service =
        com.event.logger.CommonLogEventNotifierFactory

*blueprint.xml:*
<service id="commonLogEventNotifierFactory"
interface="com.event.logger.CommonLogEventNotifierFactory">
<bean class="com.event.logger.CommonLogEventNotifierFactoryImpl">
</bean>
</service>


*Bundle 2 (uses the EventNotifierFactory to create EventNotifiers)*
Import-Service =
        com.event.logger.CommonLogEventNotifierFactory;multiple:=false

*blueprint.xml:*
<reference id="commonLogEventNotifierFactory"
interface="com.event.logger.CommonLogEventNotifierFactory" />
<bean id="commonLogEventNotifierLocal"
factory-ref="commonLogEventNotifierFactory"
factory-method="createEventNotifier" />

The EventNotifier class definition is:
public class CommonLogEventNotifier extends EventNotifierSupport implements
EventNotifier


The curious fact is that if I don't use the factory and create the
CommonLogEventNotifier bean, camel will pick it up.

*Environment:* JBoss Fuse 6.0.0  (camel-2.10.0.redhat-60024)

Regards,
Henrique Viecili

Re: EventNotifiers not working in OSGi (as imported service)

Posted by Henrique Viecili <vi...@gmail.com>.
Logged a bug in JIRA: https://issues.apache.org/jira/browse/CAMEL-7091

Henrique Viecili


On 20 December 2013 18:53, Henrique Viecili <vi...@gmail.com> wrote:

> I am looking at https://issues.apache.org/jira/browse/CAMEL-5299 and it
> says the bug is fixed but I'm facing the same kind of issue when creating
> the EventNotifier from another bundle's exported service.
>
> *Bundle 1 (exposes an EventNotifierFactory):*
> Export-Service =
>         com.event.logger.CommonLogEventNotifierFactory
>
> *blueprint.xml:*
> <service id="commonLogEventNotifierFactory"
> interface="com.event.logger.CommonLogEventNotifierFactory">
>  <bean class="com.event.logger.CommonLogEventNotifierFactoryImpl">
> </bean>
> </service>
>
>
> *Bundle 2 (uses the EventNotifierFactory to create EventNotifiers)*
> Import-Service =
>         com.event.logger.CommonLogEventNotifierFactory;multiple:=false
>
> *blueprint.xml:*
> <reference id="commonLogEventNotifierFactory"
> interface="com.event.logger.CommonLogEventNotifierFactory" />
>  <bean id="commonLogEventNotifierLocal"
> factory-ref="commonLogEventNotifierFactory"
> factory-method="createEventNotifier" />
>
> The EventNotifier class definition is:
> public class CommonLogEventNotifier extends EventNotifierSupport
> implements EventNotifier
>
>
> The curious fact is that if I don't use the factory and create the
> CommonLogEventNotifier bean, camel will pick it up.
>
> *Environment:* JBoss Fuse 6.0.0  (camel-2.10.0.redhat-60024)
>
> Regards,
> Henrique Viecili
>