You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by da...@apache.org on 2008/12/19 18:41:44 UTC

svn commit: r728077 - in /cxf/sandbox/dosgi: discovery/local/ discovery/local/src/main/java/org/osgi/ discovery/local/src/main/java/org/osgi/service/ discovery/local/src/main/java/org/osgi/service/discovery/ distribution/multi-bundle/ distribution/mult...

Author: davidb
Date: Fri Dec 19 09:41:43 2008
New Revision: 728077

URL: http://svn.apache.org/viewvc?rev=728077&view=rev
Log:
Automatically generate a file that can be appended to the Felix config.properties to easily start the Multi-Bundle distribution of D-OSGi in Felix.
The file can be found in distribution/multi-bundle/target/config.properties.append
This file also works around the fact that the javax.security.cert package is forgotten in the default Felix definition of the JRE 1.5 packages. I've filed a JIRA for this: FELIX-854

Also: included the D-OSGi standard-defined interfaces in the dsw & local discovery bundles, as recommended by Peter Kriens. They are both exported as well as imported.

Added:
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java   (with props)
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java   (with props)
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java   (with props)
    cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java   (with props)
    cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/
    cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/config.properties.append.template
    cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/
    cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/
    cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/
    cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java   (with props)
Modified:
    cxf/sandbox/dosgi/discovery/local/pom.xml
    cxf/sandbox/dosgi/distribution/multi-bundle/pom.xml
    cxf/sandbox/dosgi/dsw/cxf-dsw/pom.xml

Modified: cxf/sandbox/dosgi/discovery/local/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/discovery/local/pom.xml?rev=728077&r1=728076&r2=728077&view=diff
==============================================================================
--- cxf/sandbox/dosgi/discovery/local/pom.xml (original)
+++ cxf/sandbox/dosgi/discovery/local/pom.xml Fri Dec 19 09:41:43 2008
@@ -36,7 +36,10 @@
     <properties>
         <topDirectoryLocation>../..</topDirectoryLocation>
         <bundle.import.package>*</bundle.import.package>
-        <bundle.export.package>org.apache.cxf.dosgi.discovery.local.*</bundle.export.package>
+        <bundle.export.package>
+          org.apache.cxf.dosgi.discovery.local.*;version="${pom.version}",
+          org.osgi.service.discovery;version="4.2.0";-split-package:=merge-first
+        </bundle.export.package>
     </properties>
     
     <dependencies>

Added: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java (added)
+++ cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java Fri Dec 19 09:41:43 2008
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.discovery;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * Interface of the Discovery service. This service allows to publish services
+ * exposed for remote access as well as search for remote services. <BR>
+ * Discovery service implementations usually rely on some discovery protocols or
+ * other information distribution means.
+ * 
+ * @version $Revision$
+ */
+public interface Discovery {
+    /**
+     * 
+     */
+    final String OSGI_DISCOVERY = "osgi.discovery";
+
+    /**
+     * 
+     */
+    final String OSGI_DISCOVERY_NONE = "none";
+
+    /**
+     * 
+     */
+    final String OSGI_DISCOVERY_AUTO_PUBLISH = "auto-publish";
+
+    /**
+     * Add a ServiceListener for a particular service description.
+     * 
+     * @param filter
+     *            a filter to services to listen for. If filter is
+     *            <code>null</code> then all services are considered.
+     * @param listener
+     *            which is to call when discovery detects changes in
+     *            availability or description of a service. The same listener
+     *            object may be used to listen on multiple service filters.
+     * @throws IllegalArgumentException
+     *             if listener is null or if filter is invalid
+     */
+    void addServiceListener(ServiceListener listener, String filter);
+
+    /**
+     * This method is the same as calling
+     * <code>Discovery.addServiceListener(ServiceListener listener, String filter)</code>
+     * with <code>filter</code> set to <code>null</code>.
+     * 
+     * @param listener
+     *            which is to call when discovery detects changes in
+     *            availability or description of a service. The same listener
+     *            object may be used to listen on multiple service filters.
+     * @throws IllegalArgumentException
+     *             if listener is null
+     * @see #addServiceListener(ServiceListener, String)
+     */
+    void addServiceListener(ServiceListener listener);
+
+    /**
+     * Removes a ServiceListener.
+     * 
+     * @param listener
+     *            ServiceListener which should be removed. If that listener
+     *            object was registered several times then all registrations
+     *            will be removed. If that listener object haven't been added
+     *            before, then the method returns without throwing exceptions.
+     */
+    void removeServiceListener(ServiceListener listener);
+
+    /**
+     * Searches for services matching the provided interface name and filter.
+     * 
+     * @param interfaceName
+     *            name of the interface that returned services have to provide.
+     *            If name is null then all services are considered to match.
+     * @param filter
+     *            an LDAP filter which the service has to satisfy. If filter is
+     *            null all services are considered to match.
+     * @return Collection of <code>ServiceEndpointDescription</code> objects
+     *         which were found to match interface name and filter. The
+     *         collection is empty if none was found. The collection represents
+     *         a snapshot and as such is not going to be updated in case other matching
+     *         services become available at a later point of time.
+     */
+    Collection /* <? extends ServiceEndpointDescription> */findService(
+            String interfaceName, String filter);
+
+    /**
+     * Asynchronous version of <code>Discovery.findService(String interfaceName,
+     * String filter)</code> method.
+     * 
+     * @param interfaceName
+     *            name of the interface returned services have to provide. If
+     *            name is null then all services are considered to match.
+     * @param filter
+     *            an LDAP filter which the service has to satisfy. Note that
+     *            <code>ServiceEndpointDescription</code> defines some
+     *            properties for service url, interface version etc.. If filter
+     *            is null all services are considered to match.
+     * @param callback
+     *            to notify about the asynchronous response of the find
+     *            operation
+     * @throws IllegalArgumentException
+     *             if callback is null
+     * @see #findService(String, String)
+     */
+    void findService(String interfaceName, String filter,
+            FindServiceCallback callback);
+
+    /**
+     * Publish the provided service meta-data.
+     * 
+     * @param javaInterfacesAndVersions
+     *            names of java interfaces offered by the service and their
+     *            version. For every interface to publish you have to define its
+     *            version. If you don't have a version, put "0.0.0" in it.
+     * @param javaInterfacesAndEndpointInterfaces
+     *            associates java interfaces to general end point interface
+     *            names. It is not needed to to have and end point interface for
+     *            a java interface. The map may be null.
+     * @param properties
+     *            a bag of service properties (key-value pairs) to be published.
+     *            It may be null. Note that Discovery might make use of certain
+     *            standard properties like the ones defined by
+     *            {@link ServiceEndpointDescription} for the publication process
+     *            if they are provided.
+     * 
+     * @return an instance of {@link ServiceEndpointDescription} or null if the
+     *         publishing failed
+     * 
+     * @throws IllegalArgumentException
+     *             if javaInterfacesAndVersions is null or empty
+     */
+    ServiceEndpointDescription publishService(
+            Map/* <String, String> */javaInterfacesAndVersions,
+            Map/* <String, String> */javaInterfacesAndEndpointInterfaces,
+            Map/* <String, Object> */properties);
+
+    /**
+     * Publish the provided service. The information is published by the
+     * Discovery implementation.<b> If the parameter autopublish=true, the
+     * Discovery implementation actively pushes the information about the
+     * service to the network. Otherwise, it is just available upon request from
+     * other Discovery implementations. The ServiceEndpointDescription is
+     * matched using the Comparable interface.
+     * 
+     * @param javaInterfacesAndVersions
+     *            its an association between interfaces and versions. For every
+     *            interface to publish you have to define its version. If you
+     *            don't have a version, put "0.0.0" in it.
+     * @param javaInterfacesAndEndpointInterfaces
+     *            associates java interfaces to general end point interface
+     *            names. It is not needed to to have and end point interface for
+     *            a java interface. The map can be null.
+     * @param properties
+     *            a bag of properties to be published; can be null
+     * @param autopublish
+     *            if true, service information is actively pushed to the network
+     *            for discovery
+     * 
+     * @return an instance of {@link ServiceEndpointDescription} or null if the
+     *         publishing failed
+     * 
+     * @throws IllegalArgumentException
+     *             if javaInterfacesAndVersions is null or empty
+     */
+    ServiceEndpointDescription publishService(
+            Map/* <String, String> */javaInterfacesAndVersions,
+            Map/* <String, String> */javaInterfacesAndEndpointInterfaces,
+            Map/* <String, Object> */properties, boolean autopublish);
+
+    /**
+     * Make the given service un-discoverable. The previous publish request for
+     * a service is undone. The service information is also removed from the
+     * local or global cache if cached before.
+     * 
+     * @param serviceEndpointDescription
+     *            ServiceEndpointDescription of the service to unpublish. If
+     *            this ServiceEndpointDescription haven't been published before,
+     *            then the method returns without throwing exceptions.
+     * @throws IllegalArgumentException
+     *             if serviceEndpointDescription is null or incomplete
+     */
+    void unpublishService(ServiceEndpointDescription serviceEndpointDescription);
+}

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/Discovery.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java (added)
+++ cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java Fri Dec 19 09:41:43 2008
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.discovery;
+
+import java.util.Collection;
+
+/**
+ * Interface for callback objects, which can be provided with an asynchronous
+ * find service operation and which will be called when the operation actually
+ * finished.
+ * 
+ * @version $Revision$
+ */
+public interface FindServiceCallback {
+    /**
+     * Callback indicating that a previously started asynchronous find service
+     * operation finished.
+     * 
+     * @param serviceEndpointDescriptions
+     *            ServiceDescription objects satisfying the provided find
+     *            criteria. The collection is never null but may be empty if
+     *            none was found. The collection represents a snapshot and as
+     *            such is not going to be updated in case other matching
+     *            services become available at a later point of time.
+     */
+    void servicesFound(
+            Collection /* <? extends ServiceEndpointDescription> */serviceEndpointDescriptions);
+}

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/FindServiceCallback.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java (added)
+++ cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java Fri Dec 19 09:41:43 2008
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.discovery;
+
+import java.net.URL;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * The ServiceEndpointDescription interface describes an endpoint of a service.
+ * This class can be considered as a wrapper around the property map associated
+ * with a service and its endpoint. It provides an API to conveniently access
+ * the most important properties of the service.
+ * 
+ * @version $Revision$
+ */
+public interface ServiceEndpointDescription {
+    /**
+     * If value of <code>getProtocolSpecificInterfaceName</code> needs to be
+     * described as a key-value pair e.g. by the discovery protocol, filter for
+     * discovery etc. and there is no other key standardized for that purpose
+     * yet, then this is the recommended property key to use.
+     */
+    public final String PROP_KEY_PROTOCOL_SPECIFIC_INTERFACE_NAME = "protocol-specific-interface-name";
+
+    /**
+     * If value of <code>getVersion</code> needs to be described as a key-value
+     * pair e.g. by the discovery protocol, filter for discovery etc. and there
+     * is no other key standardized for that purpose yet, then this is the
+     * recommended property key to use.
+     */
+    public final String PROP_KEY_VERSION = "version";
+
+    /**
+     * If value of <code>getServiceLocation</code> needs to be described as a
+     * key-value pair e.g. by the discovery protocol, filter for discovery etc.
+     * and there is no other key standardized for that purpose yet, then this is
+     * the recommended property key to use.
+     */
+    public final String PROP_KEY_SERVICE_LOCATION = "location";
+
+    /**
+     * @return full qualified service interface names provided by the advertised
+     *         service (endpoint). The collection is never null or
+     *         empty but contains at least one service interface. 
+     */
+    Collection /* <? extends String> */getInterfaceNames();
+
+    /**
+     * @param interfaceName
+     *            for which its communication protocol specific version should
+     *            be returned. It might be for instance a web service interface
+     *            name. Though this information is usually contained in
+     *            according interface descriptions, e.g. a wsdl file, it can
+     *            optionally be provided here as well since discovery usually
+     *            doesn't read and interprets such accompanying descriptions.
+     * 
+     * @return The protocol specific service interface name.
+     */
+    String getProtocolSpecificInterfaceName(String interfaceName);
+
+    /**
+     * @param interfaceName
+     *            for which its version should be returned.
+     * @return The service interface/implementation version.
+     */
+    String getVersion(String interfaceName);
+
+    /**
+     * @return The URL of the service location.
+     */
+    URL getLocation();
+
+    /**
+     * Getter method for the property value of a given key.
+     * 
+     * @param key
+     *            Name of the property
+     * @return The property value, null if none is found for the given key
+     */
+    Object getProperty(String key);
+
+    /**
+     * @return <code>java.util.Collection</code> of property names available in
+     *         the ServiceEndpointDescription. The collection is never null or
+     *         empty but contains at least basic properties like objectClass for
+     *         the service interface. The collection represents a snapshot and
+     *         as such is not going to be updated in case properties were added
+     *         or removed at a later point of time.
+     */
+    Collection/* <? extends String> */getPropertyKeys();
+
+    /**
+     * @return Returns all properties of the service as a
+     *         <code>java.util.Map</code>. The map is never null or empty but
+     *         contains at least basic properties like objectClass for the
+     *         service interface. The collection represents a snapshot and as
+     *         such is not going to be updated in case properties were added or
+     *         removed at a later point of time.
+     */
+    Map/* <String, Object> */getProperties();
+}

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceEndpointDescription.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java (added)
+++ cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java Fri Dec 19 09:41:43 2008
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.service.discovery;
+
+/**
+ * Describes the interface of listeners, which can be registered with
+ * Discovery to be notified on life-cycle changes of remote services.
+ * 
+ * @version $Revision$
+ */
+public interface ServiceListener {
+    /**
+     * Callback indicating that a service matching the listening criteria was
+     * discovered and is known to the calling Discovery implementation.
+     * 
+     * @param serviceEndpointDescription
+     *            meta-data which is known to Discovery regarding the new
+     *            service.
+     */
+    void serviceAvailable(ServiceEndpointDescription serviceEndpointDescription);
+
+    /**
+     * Callback indicating a change in the service endpoint description of a
+     * previously discovered service.
+     * 
+     * @param oldDescription
+     *            previous service endpoint description
+     * @param newDescription
+     *            new service endpoint description
+     */
+    void serviceModified(ServiceEndpointDescription oldDescription,
+            ServiceEndpointDescription newDescription);
+
+    /**
+     * Callback indicating that a previously discovered service endpoint is no longer
+     * available.
+     * 
+     * @param serviceEndpointDescription
+     *            ServiceEndpointDescription of the service that is no longer
+     *            available
+     */
+    void serviceUnavailable(
+            ServiceEndpointDescription serviceEndpointDescription);
+}

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/discovery/local/src/main/java/org/osgi/service/discovery/ServiceListener.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/sandbox/dosgi/distribution/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/distribution/multi-bundle/pom.xml?rev=728077&r1=728076&r2=728077&view=diff
==============================================================================
--- cxf/sandbox/dosgi/distribution/multi-bundle/pom.xml (original)
+++ cxf/sandbox/dosgi/distribution/multi-bundle/pom.xml Fri Dec 19 09:41:43 2008
@@ -23,7 +23,7 @@
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-dosgi-ri-multibundle-distribution</artifactId>
   <version>1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
+  <packaging>jar</packaging>
   <name>Distributed OSGI Multi-Bundle Distribution</name>
   <url>http://cxf.apache.org</url>
 
@@ -220,6 +220,7 @@
           </execution>
         </executions>
       </plugin>
+      
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <executions>
@@ -238,6 +239,94 @@
           </execution>
         </executions>
       </plugin>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.felix</groupId>
+                  <artifactId>org.osgi.compendium</artifactId>
+                  <version>1.2.0</version>
+                  <type>jar</type>
+                  <outputDirectory>target/deps</outputDirectory>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <configuration>
+              <tasks>
+                <path id="current.dir.path">
+                  <pathelement location="."/>
+                </path>
+                <pathconvert targetos="unix" property="current.dir" refid="current.dir.path"/>
+                <echo message="***************** ${current.dir}"/>
+                <copy file="target/classes/config.properties.append.template" tofile="target/config.properties.append">
+                  <filterset>
+                    <filter token="TARGET" value="${current.dir}/target"/>
+                  </filterset>
+                </copy>
+                
+                <!--
+                <replace file="target/config.properties.append" token="\" value="/"/>
+                <fileset dir="target/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles" id="api.bundles.set">
+                  <include name="*api*"/>
+                  <exclude name="*cxf*"/>
+                </fileset>
+                <pathconvert pathsep=" file:/" property="api.bundles" refid="api.bundles.set"/>
+
+                <fileset dir="target/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles" id="lib.bundles.set">
+                  <include name="*"/>
+                  <exclude name="*api*"/>
+                  <exclude name="*cxf*"/>
+                </fileset>
+                <pathconvert pathsep=" file:/" property="lib.bundles" refid="lib.bundles.set"/>
+
+                <fileset dir="target/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles" id="cxf.bundles.set">
+                  <include name="*cxf*"/>
+                </fileset>
+                <pathconvert pathsep=" file:/" property="cxf.bundles" refid="cxf.bundles.set"/>
+
+                <fileset dir="target/deps" id="dep.bundles">
+                  <include name="*.jar"/>
+                </fileset>
+                <pathconvert pathsep=" file:/" property="deps" refid="dep.bundles"/>
+
+
+                <echo file="target/config.properties.append">
+org.osgi.framework.startlevel=5
+felix.auto.start.2= file:/${deps}
+felix.auto.install.3= file:/${api.bundles}
+felix.auto.start.4= file:/${lib.bundles}
+felix.auto.start.5= file:/${cxf.bundles}
+                </echo>
+
+                <replace file="target/config.properties.append" token="\" value="/"/>
+                -->
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin> 
     </plugins>
   </build>
 </project>

Added: cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/config.properties.append.template
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/config.properties.append.template?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/config.properties.append.template (added)
+++ cxf/sandbox/dosgi/distribution/multi-bundle/src/main/resources/config.properties.append.template Fri Dec 19 09:41:43 2008
@@ -0,0 +1,330 @@
+org.osgi.framework.startlevel=34
+felix.auto.start.2= file:/@TARGET@/deps/org.osgi.compendium-1.2.0.jar
+felix.auto.start.3= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/geronimo-annotation_1.0_spec-1.1.1.jar
+felix.auto.start.4= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/geronimo-activation_1.1_spec-1.0.2.jar
+felix.auto.start.5= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/geronimo-javamail_1.4_spec-1.2.jar
+felix.auto.start.6= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/geronimo-ws-metadata_2.0_spec-1.1.2.jar
+felix.auto.start.7= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/geronimo-servlet_2.5_spec-1.1.2.jar
+felix.auto.start.8= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/com.springsource.org.apache.commons.logging-1.1.1.jar
+felix.auto.start.9= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/com.springsource.org.jdom-1.0.0.jar
+felix.auto.start.10= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-core-2.5.5.jar
+felix.auto.start.11= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-beans-2.5.5.jar
+felix.auto.start.12= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-context-2.5.5.jar
+felix.auto.start.13= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/com.springsource.org.aopalliance-1.0.0.jar
+felix.auto.start.14= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-aop-2.5.5.jar
+felix.auto.start.15= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-osgi-io-1.1.2.jar
+felix.auto.start.16= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-osgi-core-1.1.2.jar
+felix.auto.start.17= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/spring-osgi-extender-1.1.2.jar
+felix.auto.start.18= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/jetty-util-6.1.9.jar
+felix.auto.start.19= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/jetty-6.1.9.jar
+felix.auto.start.20= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.specs.locator-1.0.0.jar
+felix.auto.start.21= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.jaxb-impl-2.0.3-4.0-m1.jar
+felix.auto.start.22= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.wsdl4j-1.6.1-4.0-m1.jar
+felix.auto.start.23= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.xmlschema-1.3.2-4.0-m1.jar
+felix.auto.start.24= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.asm-2.2.3-1.0.0-rc1.jar
+felix.auto.start.25= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.xmlresolver-1.2-4.0-m1.jar
+felix.auto.start.26= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.neethi-2.0.2-4.0-m1.jar
+felix.auto.start.27= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.bundles.woodstox-3.2.7_1.jar
+felix.auto.start.28= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/cxf-bundle-minimal-2.0.8.jar
+felix.auto.start.29= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/cxf-dosgi-ri-discovery-local-1.0-SNAPSHOT.jar
+felix.auto.start.30= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/cxf-dosgi-ri-dsw-cxf-1.0-SNAPSHOT.jar
+felix.auto.start.31= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.specs.saaj-api-1.3-1.0.0.jar
+felix.auto.start.32= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.specs.stax-api-1.0-1.0.0.jar
+felix.auto.start.33= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.specs.jaxb-api-2.0-1.0.0.jar
+felix.auto.start.34= file:/@TARGET@/cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT-dosgi-ri-multi-bundle-assembly.dir/bundles/org.apache.servicemix.specs.jaxws-api-2.0-1.0.0.jar
+
+org.osgi.framework.system.packages=org.osgi.framework; version=1.4.0, \
+ org.osgi.framework.hooks.service,  \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.1.0, \
+ org.osgi.service.url; version=1.0.0, \
+ org.osgi.util.tracker; version=1.3.3 \
+ ${jre-${java.specification.version}}
+
+jre-1.5=, \
+ javax.accessibility; \
+ javax.activity; \
+ javax.crypto; \
+ javax.crypto.interfaces; \
+ javax.crypto.spec; \
+ javax.imageio; \
+ javax.imageio.event; \
+ javax.imageio.metadata; \
+ javax.imageio.plugins.bmp; \
+ javax.imageio.plugins.jpeg; \
+ javax.imageio.spi; \
+ javax.imageio.stream; \
+ javax.management; \
+ javax.management.loading; \
+ javax.management.modelmbean; \
+ javax.management.monitor; \
+ javax.management.openmbean; \
+ javax.management.relation; \
+ javax.management.remote; \
+ javax.management.remote.rmi; \
+ javax.management.timer; \
+ javax.naming; \
+ javax.naming.directory; \
+ javax.naming.event; \
+ javax.naming.ldap; \
+ javax.naming.spi; \
+ javax.net; \
+ javax.net.ssl; \
+ javax.print; \
+ javax.print.attribute; \
+ javax.print.attribute.standard; \
+ javax.print.event; \
+ javax.rmi; \
+ javax.rmi.CORBA; \
+ javax.rmi.ssl; \
+ javax.security.auth; \
+ javax.security.auth.callback; \
+ javax.security.auth.kerberos; \
+ javax.security.auth.login; \
+ javax.security.auth.spi; \
+ javax.security.auth.x500; \
+ javax.security.sasl; \
+ javax.security.cert; \
+ javax.sound.midi; \
+ javax.sound.midi.spi; \
+ javax.sound.sampled; \
+ javax.sound.sampled.spi; \
+ javax.sql; \
+ javax.sql.rowset; \
+ javax.sql.rowset.serial; \
+ javax.sql.rowset.spi; \
+ javax.swing; \
+ javax.swing.border; \
+ javax.swing.colorchooser; \
+ javax.swing.event; \
+ javax.swing.filechooser; \
+ javax.swing.plaf; \
+ javax.swing.plaf.basic; \
+ javax.swing.plaf.metal; \
+ javax.swing.plaf.multi; \
+ javax.swing.plaf.synth; \
+ javax.swing.table; \
+ javax.swing.text; \
+ javax.swing.text.html; \
+ javax.swing.text.html.parser; \
+ javax.swing.text.rtf; \
+ javax.swing.tree; \
+ javax.swing.undo; \
+ javax.transaction; \
+ javax.transaction.xa; \
+ javax.xml; \
+ javax.xml.datatype; \
+ javax.xml.namespace; \
+ javax.xml.parsers; \
+ javax.xml.transform; \
+ javax.xml.transform.dom; \
+ javax.xml.transform.sax; \
+ javax.xml.transform.stream; \
+ javax.xml.validation; \
+ javax.xml.xpath; \
+ org.ietf.jgss; \
+ org.omg.CORBA; \
+ org.omg.CORBA_2_3; \
+ org.omg.CORBA_2_3.portable; \
+ org.omg.CORBA.DynAnyPackage; \
+ org.omg.CORBA.ORBPackage; \
+ org.omg.CORBA.portable; \
+ org.omg.CORBA.TypeCodePackage; \
+ org.omg.CosNaming; \
+ org.omg.CosNaming.NamingContextExtPackage; \
+ org.omg.CosNaming.NamingContextPackage; \
+ org.omg.Dynamic; \
+ org.omg.DynamicAny; \
+ org.omg.DynamicAny.DynAnyFactoryPackage; \
+ org.omg.DynamicAny.DynAnyPackage; \
+ org.omg.IOP; \
+ org.omg.IOP.CodecFactoryPackage; \
+ org.omg.IOP.CodecPackage; \
+ org.omg.Messaging; \
+ org.omg.PortableInterceptor; \
+ org.omg.PortableInterceptor.ORBInitInfoPackage; \
+ org.omg.PortableServer; \
+ org.omg.PortableServer.CurrentPackage; \
+ org.omg.PortableServer.POAManagerPackage; \
+ org.omg.PortableServer.POAPackage; \
+ org.omg.PortableServer.portable; \
+ org.omg.PortableServer.ServantLocatorPackage; \
+ org.omg.SendingContext; \
+ org.omg.stub.java.rmi; \
+ org.omg.stub.javax.management.remote.rmi; \
+ org.w3c.dom; \
+ org.w3c.dom.bootstrap; \
+ org.w3c.dom.css; \
+ org.w3c.dom.events; \
+ org.w3c.dom.html; \
+ org.w3c.dom.ls; \
+ org.w3c.dom.ranges; \
+ org.w3c.dom.stylesheets; \
+ org.w3c.dom.traversal; \
+ org.w3c.dom.views; \
+ org.xml.sax; \
+ org.xml.sax.ext; \
+ org.xml.sax.helpers; \
+ version="1.5.0"
+
+jre-1.6=, \
+ javax.accessibility; \
+ javax.activation; \
+ javax.activity; \
+ javax.annotation; \
+ javax.annotation.processing; \
+ javax.crypto; \
+ javax.crypto.interfaces; \
+ javax.crypto.spec; \
+ javax.imageio; \
+ javax.imageio.event; \
+ javax.imageio.metadata; \
+ javax.imageio.plugins.bmp; \
+ javax.imageio.plugins.jpeg; \
+ javax.imageio.spi; \
+ javax.imageio.stream; \
+ javax.jws; \
+ javax.jws.soap; \
+ javax.lang.model; \
+ javax.lang.model.element; \
+ javax.lang.model.type; \
+ javax.lang.model.util; \
+ javax.management; \
+ javax.management.loading; \
+ javax.management.modelmbean; \
+ javax.management.monitor; \
+ javax.management.openmbean; \
+ javax.management.relation; \
+ javax.management.remote; \
+ javax.management.remote.rmi; \
+ javax.management.timer; \
+ javax.naming; \
+ javax.naming.directory; \
+ javax.naming.event; \
+ javax.naming.ldap; \
+ javax.naming.spi; \
+ javax.net; \
+ javax.net.ssl; \
+ javax.print; \
+ javax.print.attribute; \
+ javax.print.attribute.standard; \
+ javax.print.event; \
+ javax.rmi; \
+ javax.rmi.CORBA; \
+ javax.rmi.ssl; \
+ javax.script; \
+ javax.security.auth; \
+ javax.security.auth.callback; \
+ javax.security.auth.kerberos; \
+ javax.security.auth.login; \
+ javax.security.auth.spi; \
+ javax.security.auth.x500; \
+ javax.security.cert; \
+ javax.security.sasl; \
+ javax.sound.midi; \
+ javax.sound.midi.spi; \
+ javax.sound.sampled; \
+ javax.sound.sampled.spi; \
+ javax.sql; \
+ javax.sql.rowset; \
+ javax.sql.rowset.serial; \
+ javax.sql.rowset.spi; \
+ javax.swing; \
+ javax.swing.border; \
+ javax.swing.colorchooser; \
+ javax.swing.event; \
+ javax.swing.filechooser; \
+ javax.swing.plaf; \
+ javax.swing.plaf.basic; \
+ javax.swing.plaf.metal; \
+ javax.swing.plaf.multi; \
+ javax.swing.plaf.synth; \
+ javax.swing.table; \
+ javax.swing.text; \
+ javax.swing.text.html; \
+ javax.swing.text.html.parser; \
+ javax.swing.text.rtf; \
+ javax.swing.tree; \
+ javax.swing.undo; \
+ javax.tools; \
+ javax.transaction; \
+ javax.transaction.xa; \
+ javax.xml; \
+ javax.xml.bind; \
+ javax.xml.bind.annotation; \
+ javax.xml.bind.annotation.adapters; \
+ javax.xml.bind.attachment; \
+ javax.xml.bind.helpers; \
+ javax.xml.bind.util; \
+ javax.xml.crypto; \
+ javax.xml.crypto.dom; \
+ javax.xml.crypto.dsig; \
+ javax.xml.crypto.dsig.dom; \
+ javax.xml.crypto.dsig.keyinfo; \
+ javax.xml.crypto.dsig.spec; \
+ javax.xml.datatype; \
+ javax.xml.namespace; \
+ javax.xml.parsers; \
+ javax.xml.soap; \
+ javax.xml.stream; \
+ javax.xml.stream.events; \
+ javax.xml.stream.util; \
+ javax.xml.transform; \
+ javax.xml.transform.dom; \
+ javax.xml.transform.sax; \
+ javax.xml.transform.stax; \
+ javax.xml.transform.stream; \
+ javax.xml.validation; \
+ javax.xml.ws; \
+ javax.xml.ws.handler; \
+ javax.xml.ws.handler.soap; \
+ javax.xml.ws.http; \
+ javax.xml.ws.soap; \
+ javax.xml.ws.spi; \
+ javax.xml.xpath; \
+ org.ietf.jgss; \
+ org.omg.CORBA; \
+ org.omg.CORBA_2_3; \
+ org.omg.CORBA_2_3.portable; \
+ org.omg.CORBA.DynAnyPackage; \
+ org.omg.CORBA.ORBPackage; \
+ org.omg.CORBA.portable; \
+ org.omg.CORBA.TypeCodePackage; \
+ org.omg.CosNaming; \
+ org.omg.CosNaming.NamingContextExtPackage; \
+ org.omg.CosNaming.NamingContextPackage; \
+ org.omg.Dynamic; \
+ org.omg.DynamicAny; \
+ org.omg.DynamicAny.DynAnyFactoryPackage; \
+ org.omg.DynamicAny.DynAnyPackage; \
+ org.omg.IOP; \
+ org.omg.IOP.CodecFactoryPackage; \
+ org.omg.IOP.CodecPackage; \
+ org.omg.Messaging; \
+ org.omg.PortableInterceptor; \
+ org.omg.PortableInterceptor.ORBInitInfoPackage; \
+ org.omg.PortableServer; \
+ org.omg.PortableServer.CurrentPackage; \
+ org.omg.PortableServer.POAManagerPackage; \
+ org.omg.PortableServer.POAPackage; \
+ org.omg.PortableServer.portable; \
+ org.omg.PortableServer.ServantLocatorPackage; \
+ org.omg.SendingContext; \
+ org.omg.stub.java.rmi; \
+ org.omg.stub.javax.management.remote.rmi; \
+ org.w3c.dom; \
+ org.w3c.dom.bootstrap; \
+ org.w3c.dom.css; \
+ org.w3c.dom.events; \
+ org.w3c.dom.html; \
+ org.w3c.dom.ls; \
+ org.w3c.dom.ranges; \
+ org.w3c.dom.stylesheets; \
+ org.w3c.dom.traversal; \
+ org.w3c.dom.views; \
+ org.w3c.dom.xpath; \
+ org.xml.sax; \
+ org.xml.sax.ext; \
+ org.xml.sax.helpers; \
+ version="1.6.0"
+

Modified: cxf/sandbox/dosgi/dsw/cxf-dsw/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/dsw/cxf-dsw/pom.xml?rev=728077&r1=728076&r2=728077&view=diff
==============================================================================
--- cxf/sandbox/dosgi/dsw/cxf-dsw/pom.xml (original)
+++ cxf/sandbox/dosgi/dsw/cxf-dsw/pom.xml Fri Dec 19 09:41:43 2008
@@ -35,7 +35,10 @@
     <properties>
         <topDirectoryLocation>../..</topDirectoryLocation>
         <bundle.import.package>*</bundle.import.package>
-        <bundle.export.package>org.apache.cxf.dosgi.*</bundle.export.package>
+        <bundle.export.package>
+          org.apache.cxf.dosgi.*;version="${pom.version}",
+          org.osgi.service.distribution;version="4.2.0";-split-package:=merge-first
+        </bundle.export.package>
     </properties>
     
     <dependencies>

Added: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java?rev=728077&view=auto
==============================================================================
--- cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java (added)
+++ cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java Fri Dec 19 09:41:43 2008
@@ -0,0 +1,98 @@
+/*
+ * $Date$
+ *
+ * Copyright (c) OSGi Alliance (2004, 2007). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.osgi.service.distribution;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Every Distribution Provider registers exactly one Service in the
+ * ServiceRegistry implementing this interface. The service is registered with
+ * extra properties identified at the beginning of this interface to denote the
+ * Distribution Provider product name, version, vendor and supported intents.
+ */
+public interface DistributionProvider {
+    /**
+     * Service Registration property for the name of the Distribution Provider
+     * product.
+     */
+    static final String PROP_KEY_PRODUCT_NAME = 
+                            "osgi.remote.distribution.product";
+
+    /**
+     * Service Registration property for the version of the Distribution
+     * Provider product.
+     */
+    static final String PROP_KEY_PRODUCT_VERSION =
+                            "osgi.remote.distribution.product.version";
+
+    /**
+     * Service Registration property for the Distribution Provider product
+     * vendor name.
+     */
+    static final String PROP_KEY_VENDOR_NAME = 
+                            "osgi.remote.distribution.vendor";
+
+    /**
+     * Service Registration property that lists the intents supported by this
+     * DistributionProvider.
+     */
+    static final String PROP_KEY_SUPPORTED_INTENTS =
+                            "osgi.remote.distribition.supported_intents";
+
+    /**
+     * @return ServiceReferences of services registered in the local Service
+     *         Registry that are proxies to remote services. If no proxies are
+     *         registered, then an empty collection is returned.
+     */
+    Collection /*<? extends ServiceReference>*/ getRemoteServices();
+
+    /**
+     * @return ServiceReferences of local services that are exposed remotely 
+     *         using this DisitributionProvider. Note that certain services may be
+     *         exposed and without being published to a discovery service. This 
+     *         API returns all the exposed services. If no services are exposed an 
+     *         empty collection is returned.
+     */
+    Collection /*<? extends ServiceReference>*/ getExposedServices();
+
+    /**
+     * Provides access to extra properties set by the DistributionProvider on
+     * endpoints, as they will appear on client side proxies given an exposed
+     * ServiceReference. 
+     * These properties are not always available on the server-side
+     * ServiceReference of the exposed
+     * service but will be on the remote client side proxy to this service.
+     * This API provides access to these extra properties from the exposing
+     * side.
+     * E.g. a service is exposed remotely, the distribution software is configured
+     * to add transactionality to the remote service. Because of this, on the 
+     * client-side proxy the property osgi.intents=”transactionality” is set. 
+     * However, these intents are *not* always set on the original
+     * ServiceRegistration on the server-side since on the server side the service
+     * object is a local pojo which doesn’t provide transactionality by itself.
+     * This QoS is added by the distribution.
+     * This API provides access to these extra properties from the server-side.
+     * 
+     * @param sr A ServiceReference of an exposed service.
+     * @return The map of extra properties.
+     */
+    Map /*<String, String>*/ getExposedProperties(ServiceReference sr);
+}

Propchange: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date