-
1. Re: CXF-DOSGI Distributed discovery
mcr701 Aug 13, 2012 2:23 AM (in response to spandit2)I'm trying to get the same thing running and I made some progress on this, so I thought
I will share this, even though it is not yet fully functional. I'm running JBoss 7.1.1.Final
For some reason, I had to disable configadmin subsystem. I got some errors on the log file
complaining about it.
Instead I have now felix configadmin installed (comes with the cxf dosgi) for the zookeeper part,
I think these are the capabilities I have:
- org.apache.felix.configadmin
- org.apache.felix.fileinstall
- org.apache.zookeeper
- com.springsource.org.jdom
- org.apache.cxfdosgi.cxfdosgi-discovery.distributed
- org.apache.cxfdosgi.cxfdosgi-discovery.zookeeper-server
- org.apache.cxfdosgi.cxfdosgi-discovery.zookeeper-server-config
After this setup, I got my zookeeper up and running. And I get my component automatically registered
to zookeeper.
-
2. Re: CXF-DOSGI Distributed discovery
mcr701 Aug 16, 2012 3:31 AM (in response to mcr701)By default, zookeeper assigns a random port number to which it listens. In the log file,
I could see something like "Setting global zookeeper port to xxxxxx".
By setting this configuration to standalone.xml, I can set the port number to fixed
<system-properties>
<property name="org.apache.cxf.dosgi.discovery.zookeeper.port" value="2181" />
</system-properties>
-
3. Re: CXF-DOSGI Distributed discovery
mcr701 Aug 16, 2012 4:09 AM (in response to mcr701)On client side, one needs to create an entry in the OSGi Configuration Admin Service with
PID org.apache.cxf.dosgi.discovery.zookeeper
and values
zookeeper.host=localhost
zookeeper.port=2181
With Apache Karaf(I'm using karaf as a client OSGi framework), this can be accomplished by creating a file $KARAF_ROOT/etc/org.apache.cxf.dosgi.discovery.zookeeper.cfg
with contents
zookeeper.host=localhost
zookeeper.port=2181
What is still missing, is eclipse integration. I'm using bnd tools to launch my application during development but I have no idea
so far how to tell bnd tools / eclipse configuration above?!?!?!
-
4. Re: CXF-DOSGI Distributed discovery
mcr701 Aug 24, 2012 12:27 AM (in response to mcr701)Eclipse integration can be done by utilizing felix fileinstall bundle (comes with the cxf dosgi).
Create a directory named "load/" in your projects root and place a file named org.apache.cxf.dosgi.discovery.zookeeper.cfg
with contents
zookeeper.host=localhost
zookeeper.port=2181