cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: Using Distributed OSGi with dynamic dispatch?
Date Wed, 14 May 2014 09:43:58 GMT
I am not sure I understand what you are trying to achieve.
Can you formulate this from a pure business view so without the technology?

This is what I think you want:

B wants to receive events from A. So it registers with A as a kind of 
listener. A then asynchronously sends events to B. Is that correct?
If yes then you might want to rather look into JMS or Distributed Event 
Admin (

I can imagine that it can be achieved with DOSGi but it would bend the 
scope of the framework quite a bit.

The easiest solution I can imagine as long as the above spec is not 
implemented is using jms topics for communication and hiding jms behind 
a regular OSGi service.


On 14.05.2014 05:23, Mello, Cody wrote:
> Hello everyone,
> I'm fairly new to CXF, and have been working on adapting a project to
> use Distributed OSGi. I've been successful so far by following the
> Spring DM example, but I've hit a wall. After some searching online, I
> can't quite determine how to proceed. I have some code that works
> something like this:
> class A implements Service {
>      public void register(String str, Client client) {
>, client);
>      }
>      public void performLater(String str) {
>      }
>      ....
> }
> class B implements Client {
>      protected Service service;
>      public void setService(Service serv) {
>          this.service = serv;
>      }
>      public void registerWithServer() {
>          this.service.register("myName", this);
>      }
>      public void receive() {
>          ....
>      }
> }
> Here, A is a service available on one Equinox instance, made available
> over port 9000, and B is on another Equinox instance, making calls to
> A. I have this working well in one direction so far, but the instant
> that performLater() is called, I get an error message like this:
> Exception in thread "pool-6-thread-1" java.lang.IllegalAccessError:
> receive is not delegated.
>      at org.apache.cxf.aegis.type.basic.InterfaceInvocationHandler.invoke(
>      at com.sun.proxy.$Proxy53.receive(Unknown Source)
>      at net.beaconcontroller.core.internal.Controller.handleMessages(
>      at net.beaconcontroller.core.internal.Controller.handleSwitchEvent(
>      at net.beaconcontroller.core.internal.Controller.handleEvent(
>      at
>      at net.beaconcontroller.core.internal.Controller$
>      at java.util.concurrent.ThreadPoolExecutor.runWorker(
>      at java.util.concurrent.ThreadPoolExecutor$
>      at
> I believe that I understand why this isn't working: I haven't exported
> any service for Client which can be consumed by the Service. I don't
> know where to head from here, though. I would like to be able to
> deploy multiple Clients in multiple bundles on the same OSGi instance
> and also deploy multiple Equinox instances on separate machines, which
> can dynamically register and deregister themselves with the Service.
> Is this something that I can do with DOSGi or any of the CXF projects?
> If so, what would this look like, and are there any examples I can
> reference?
> Thanks!
> - Cody

Christian Schneider

Open Source Architect

View raw message