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) {
        this.map.put(str, client);
    }

    public void performLater(String str) {
        this.map.get(str).receive();
    }

    ....
}

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(InterfaceInvocationHandler.java:57)
    at com.sun.proxy.$Proxy53.receive(Unknown Source)
    at 
net.beaconcontroller.core.internal.Controller.handleMessages(Controller.java:387)
    at 
net.beaconcontroller.core.internal.Controller.handleSwitchEvent(Controller.java:199)
    at 
net.beaconcontroller.core.internal.Controller.handleEvent(Controller.java:138)
    at net.beaconcontroller.core.io.internal.IOLoop.doLoop(IOLoop.java:122)
    at net.beaconcontroller.core.internal.Controller$2.run(Controller.java:541)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

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

Reply via email to