I have a problem in the implementation of CXF DOSGi.
On the import side I create a ServiceFactory and publish it with the
name of the interface of the remote service.
The problem is that the ServiceFactory is not picked up by consumer
bundles unless I also load the interface class using the bundle that
exports the service:
https://github.com/apache/cxf-dosgi/blob/master/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java#L375
I think this causes the bundle to import the respective package. As for
example a ServiceTracker will only pick up the services with the correct
package this seems to do the trick.
The problem though is that I need Dynamic-Import: * to make this work
and I also can not create ServiceFactories for two services with the
same interface in different package versions in this way.
I already asked Peter and he said that it should not be necessary to
load the interface class. Does anyone know why it seems to be necessary
and if there is some way to avoid loading the class?
I also asked Scott Lewis (ECF) about it and he said that he thinks it
works in ECF but it may be related to him using a "proxy" bundles that
is different from the remote service admin bundle and the consumer
bundle. He does not remember in detail how it works though.
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev