|
Page Edited :
CXF :
Distributed OSGi Reference
Distributed OSGi Reference has been edited by David Bosschaert (Jul 03, 2009). Content:Distributed OSGi Reference Guide Configuration PropertiesThese properties are set on the Service Registration in the OSGi Service Registry. Service Provider propertiesNote: for backwards compatibility old values marked below are still supported.
org.apache.cxf.ws configuration typeWhen the service.exported.configs=org.apache.cxf.ws (or osgi.remote.configuration.type=pojo) property is specified, the following properties may also be specified.
Service Consumer propertiesOn client side proxies, typically the same properties are set as on set service provider side. There are some additional properties too. Since the client-side proxy is registered by the DOSGi implementation, all these properties are read-only.
The Intent MapTODO remote-services.xml filesThe CXF DOSGi implementation provides a DSW (Distribution Software) implementation of Distributed OSGi. It is compatible with any Distributed OSGi Discovery implementation in order to discover remote services dynamically. However, using a Discovery system is optional, it is also possible to statically configure remote services into the system. This is done by registering one or more bundles containing remote-services.xml files. By default the system looks for any files with the .xml extension in the OSGI-INF/remote-service directory of the bundle. Here's an example:
<service-descriptions xmlns="http://www.osgi.org/xmlns/sd/v1.0.0">
<service-description>
<provide interface="org.apache.cxf.dosgi.samples.greeter.GreeterService" />
<property name="osgi.remote.interfaces">*</property>
<property name="osgi.remote.configuration.type">pojo</property>
<property name="osgi.remote.configuration.pojo.address">http://localhost:9090/greeter</property>
</service-description><!-- further service-description tags are allowed here --> </service-descriptions> Alternative locations By default all *.xml files in the OSGI-INF/remote-service location are considered, this location can be changed by setting the Remote-Service header in the bundle manifest, e.g. Remote-Service: META-INF/osgi Contributing Distribution properties to Existing Services (without changing them)CXF/DOSGi allows you to add the distribution properties to existing services. You can do this by installing a bundle that contains an XML file with the extra properties in the OSGI-INF/remote-service directory: A sample OSGI-INF/remote-service/sd.xml file looks like this: <service-decorations xmlns="http://cxf.apache.org/xmlns/service-decoration/1.0.0">
<service-decoration>
<match interface="org.apache.F(.*)">
<match-property name="test.prop" value="xyz"/>
<add-property name="service.exported.interfaces" value="*"/>
</match>
</service-decoration>
</service-decorations>
A service decorations file can have any number of service-decoration tags, each tag describing a match rule for services that are to be decorated.
Note the bundle with the extra metadata will need to be started before the bundle with the service that is to be remoted is started (need to fix this). |
Unsubscribe or edit your notifications preferences
