Hi
By DOSGI,  you mean CXF DOSGI right ? Not Cellar DOSGI ?
RegardsJB 


Sent from my Samsung device

-------- Original message --------
From: hildo <edhillm...@yahoo.com> 
Date: 12/05/2015  02:02  (GMT+01:00) 
To: user@karaf.apache.org 
Subject: Dosgi not working with cellar? 

Hi.  I am using Karaf 3.0.3, with Cellar 3.0.2 (but I seem to get the same
behaviour with Cellar 3.0.1).

Essentially, I have two instances of karaf running.  I've installed CXF on
both instances, so each host their own REST services.  To do this, I have
four bundles:

- an API bundle (defining an interface and a dto)
- one bundle that provides an IMPL of the interface (IMPL1)
- one bundle that provides a second IMPL of the interface (IMPL2)
- a bundle that uses CXF the define a REST endpoint that uses the OSGi
service

I can configure Karaf Instance A (KA), installing the necessary features
(http, cxf, jackson libs) and deploying and starting my bundles: API, IMPL1
and REST.  This works fine when I query the REST service.

I can configure Karaf Instance B (KB), installing the same features as KA,
and deploying and starting my bundles: API, IMPL2 and REST.  This too works
fine when I query the REST service.

In my IMPL1, IMPL2 and REST bundles, I have used blueprint to
register/request services.

What I would like to do is use DOSGi in the REST endpoint in KA, to call out
to the Service hosted in KB.  To try this, I have performed these steps to
both KA and KB

- added the feature repo for karaf-cellar, v 3.0.2
- installed cellar
- installed cellar-dosgi

I have also updated the IMPL2 bundle (the one deployed to KB) so that its
service registration includes the service.exported.interfaces entry with a
value of "*" as documented in the User Guide.

At this stage, I can see hazelcast fire up in both my instances, with both
instances in the node-list.  I can also see two entries in the service-list

karaf@root()> cluster:service-list
Service Class                             | Provider Node
--------------------------------------------------------------------------
myprod.myfunction.api.ServiceContract   | mymachine.mycomp.com:5701
org.apache.aries.proxy.weaving.WovenProxy | mymachine.mycomp.com:5701

My last step is stopping the IMPL1 bundle in KA.  I can see that a new

Reply via email to