You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Christoforos Vasilatos <ch...@gmail.com> on 2014/07/02 14:41:05 UTC

Cellar DOSGI reference listener

Hello,

I'm trying to set up two karaf instances with cellar in order to expose a
service (using dosgi) from the first instance and have a reference listener
on the second node to listen for created instances of a specific interface
(I used some information from this post: 
http://blog.nanthrax.net/2011/11/apache-karaf-cellar-and-dosgi/
<http://blog.nanthrax.net/2011/11/apache-karaf-cellar-and-dosgi/>  ).

The service is created using scr component on the first node:

@Component(name = "adapter.demo", service = { Adapter.class },
configurationPolicy = ConfigurationPolicy.REQUIRE, immediate = true,
property = "service.exported.interfaces=*")
public class DemoAdapter extends BaseAdapter implements Adapter 

The reference listener is configured through blueprint on both nodes.

<reference-list id="adapterReferences" availability="optional"
interface="specs.adapter.Adapter">
  <reference-listener ref="adapterListener" bind-method="onBind"
unbind-method="onUnbind" />
</reference-list>

The first node successfully calls onBind method, but the second node is not.

The cluster:service-list command successfully reports on both nodes the
exposed service class.

Do you think that there is something I'm missing here and the
reference-listener is not triggered on the second node?

Thank you in advance,
Christoforos



--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-DOSGI-reference-listener-tp4033943.html
Sent from the Karaf - User mailing list archive at Nabble.com.