Hi Craig,

We did lot of enhancements and changed on Cellar 4.0.0, but anyway, see my comments inline:

On 12/02/2015 10:09 PM, craig niles wrote:
I'm trying to get get some DOSGi services working with Karaf 3.0.3 using
Cellar 3.0.3.  As background, I am using iPOJO for service injection.
Also, I'm using Karaf instances for all my nodes (like, instance:create
but using the karaf InstanceService).

First thing, I'm getting my services shared between nodes successfully.
However, I'm noticing something strange.  cluster:service-list show the
correct count & type of services I'm registering.  When I use
service:list remoteServiceName, though, it will give a long, growing
list of services registered that could only be duplicates of the
original service.  I am flagging the service requirement as optional
with iPOJO, and consuming an aggregate of them if thats any clue.
Hmmm, it sounds like a bug. Can you create a Jira about that ?


Second, I'm using iPOJO properties in a way that the consuming service
utilizes them through the OSGi ServiceReference (injected with iPOJO
whiteboard).  However, the properties done seem to be carried over from
the originating service on the other node.  Is this expected behavior,
and should I move that to methods instead?
Yes, it's a known issue (let me find the Jira) and I think I already fixed it on Cellar 4.0.0. Let me merge on Cellar 3.


Third, I'm using the Karaf Instance API (that is, the InstanceService)
as a means for launching nodes.  By default its placed into, well, the
default group and wants to sync up with the root instance's bundles.  I
don't want it to do this, it needs to not have the same bundle list as
its master.  It results in the creation of some services on the new node
that I don't want.
You can create a cluster group for root instance, and cluster group for other instances. You can provision etc/org.apache.karaf.cellar.groups.cfg file to define the default cluster group of an instance.


And *phew* one final note, this is all run from a custom distribution
made using the karaf-maven-plugin, so any cellar configurations would
need to be made there or with the Karaf instance api.
You can override the default etc/org.apache.karaf.cellar.* file to create your cluster groups, etc in the custom distribution.

Regards
JB
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to