You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by cs...@apache.org on 2012/11/29 18:04:47 UTC

svn commit: r1415274 - in /cxf/dosgi/trunk: dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ dsw/cxf-dsw/src/test/java/org/apach...

Author: cschneider
Date: Thu Nov 29 17:04:43 2012
New Revision: 1415274

URL: http://svn.apache.org/viewvc?rev=1415274&view=rev
Log:
DOSGI-127 Fixing errors in default address and absolute address

Added:
    cxf/dosgi/trunk/samples/greeter_rest/client/.classpath   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/client/.settings/
    cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/
    cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/
    cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs   (with props)
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java
      - copied, changed from r1414835, cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/customintent/TestCustomIntent.java
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java   (with props)
Removed:
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/customintent/TestCustomIntent.java
Modified:
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
    cxf/dosgi/trunk/systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestExportService.java
    cxf/dosgi/trunk/systests2/multi-bundle/pom.xml

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java Thu Nov 29 17:04:43 2012
@@ -65,7 +65,8 @@ public class Activator implements Manage
 
     private void start(BundleContext bc, Map<String, Object> config) {
         this.bc = bc;
-        String servletBase = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.SERVLET_BASE);
+        String httpBase = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.HTTP_BASE);
+        String cxfServletAlisas = (String) config.get(org.apache.cxf.dosgi.dsw.Constants.CXF_SERVLET_ALIAS);
         // Disable the fast infoset as it's not compatible (yet) with OSGi
         System.setProperty("org.apache.cxf.nofastinfoset", "true");
 
@@ -74,7 +75,7 @@ public class Activator implements Manage
         intentTracker = new IntentTracker(bc, intentMap);
         intentTracker.open();
         IntentManager intentManager = new IntentManagerImpl(intentMap, DEFAULT_INTENT_TIMEOUT);
-        HttpServiceManager httpServiceManager = new HttpServiceManager(bc, servletBase);
+        HttpServiceManager httpServiceManager = new HttpServiceManager(bc, httpBase, cxfServletAlisas);
         ConfigTypeHandlerFactory configTypeHandlerFactory = new ConfigTypeHandlerFactory(bc, intentManager, httpServiceManager);
         RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc, configTypeHandlerFactory);
         RemoteServiceadminFactory rsaf = new RemoteServiceadminFactory(rsaCore);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java Thu Nov 29 17:04:43 2012
@@ -115,5 +115,6 @@ public class Constants {
     public static final String DSW_CLIENT_ID = PROVIDER_PREFIX + ".remote.dsw.client";
 
     public static final String INTENT_NAME_PROP = "org.apache.cxf.dosgi.IntentName";
-    public static final Object SERVLET_BASE = "servletBase";
+    public static final String HTTP_BASE = "httpBase";
+    public static final String CXF_SERVLET_ALIAS = "cxfServletAlias";
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java Thu Nov 29 17:04:43 2012
@@ -45,29 +45,24 @@ public class HttpServiceManager {
     private ServiceTracker tracker;
     private BundleContext bundleContext;
     private Map<Long, String> exportedAliases = Collections.synchronizedMap(new HashMap<Long, String>());
-    private String servletBase;
+    private String httpBase;
+    private String cxfServletAlias;
 
-    public HttpServiceManager(BundleContext bundleContext, String servletBase) {
-        this.bundleContext = bundleContext;
-        this.tracker = new ServiceTracker(bundleContext, HttpService.class.getName(), null);
+    public HttpServiceManager(BundleContext bundleContext, String httpBase, String cxfServletAlias) {
+        this(bundleContext, httpBase, cxfServletAlias, new ServiceTracker(bundleContext, HttpService.class.getName(), null));
         this.tracker.open();
-        setServletBase(servletBase);
-        
     }
-    
+
     // Only for tests
-    public HttpServiceManager(BundleContext bundleContext, String servletBase, ServiceTracker tracker) {
+    public HttpServiceManager(BundleContext bundleContext, String httpBase, String cxfServletAlias, ServiceTracker tracker) {
         this.bundleContext = bundleContext;
         this.tracker = tracker;
-        setServletBase(servletBase);
+        this.httpBase = getWithDefault(httpBase, "http://" + LocalHostUtil.getLocalIp() + ":8181");
+        this.cxfServletAlias = getWithDefault(cxfServletAlias, "cxf");
     }
     
-    private void setServletBase(String newServletBase) {
-        this.servletBase = newServletBase;
-        if( this.servletBase == null) {
-            // This default only works for Apache Karaf and cxf with default settings
-            this.servletBase = "http://" + LocalHostUtil.getLocalIp() + ":8181/cxf";
-        }
+    private String getWithDefault(String value, String defaultValue) {
+        return value == null ? defaultValue : value;
     }
     
     public Bus registerServletAndGetBus(String contextRoot, BundleContext dswContext,
@@ -144,7 +139,8 @@ public class HttpServiceManager {
         if (relativeEndpointAddress.startsWith("http")) {
             return relativeEndpointAddress;
         }
-        return this.servletBase + relativeEndpointAddress;
+        String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; 
+        return this.httpBase + effContextRoot + relativeEndpointAddress;
     }
     
     public void close() {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java Thu Nov 29 17:04:43 2012
@@ -117,7 +117,10 @@ public class JaxRSPojoConfigurationTypeH
     public ExportResult createServer(ServiceReference sref, BundleContext dswContext,
                              BundleContext callingContext, Map<String, Object> sd, Class<?> iClass, Object serviceBean) throws IntentUnsatifiedException {
 
-        String address = getServerAddress(sd, iClass);
+        String address = getClientAddress(sd, iClass);
+        if (address == null) {
+            address = "";
+        }
         String contextRoot = httpServiceManager.getServletContextRoot(sd, iClass);
 
         Bus bus = contextRoot != null ? httpServiceManager.registerServletAndGetBus(contextRoot, dswContext, sref) : null;

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java Thu Nov 29 17:04:43 2012
@@ -73,9 +73,8 @@ public class RemoteServiceAdminCore impl
 	public List<ExportRegistration> exportService(ServiceReference serviceReference, Map additionalProperties)
         throws IllegalArgumentException, UnsupportedOperationException {
 
+        // TODO This might be wrong as it gets the classname of servicereference
         String ifaceName = serviceReference.getClass().getName();
-        LOG.debug("RemoteServiceAdmin: exportService: {}", ifaceName);
-
         synchronized (exportedServices) {
             // check if it is already exported ....
             if (exportedServices.containsKey(serviceReference)) {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java Thu Nov 29 17:04:43 2012
@@ -85,7 +85,7 @@ public class ConfigTypeHandlerFactoryTes
         serviceProps.put(RemoteConstants.SERVICE_EXPORTED_INTENTS, intents);
         IntentMap intentMap = new IntentMap(new DefaultIntentMapFactory().create());
         IntentManager intentManager = new IntentManagerImpl(intentMap);
-        HttpServiceManager httpServiceManager = new HttpServiceManager(bc, null);
+        HttpServiceManager httpServiceManager = new HttpServiceManager(bc, null, null);
         ConfigTypeHandlerFactory f = new ConfigTypeHandlerFactory(bc, intentManager, httpServiceManager);
         return f.getHandler(bc, serviceProps);
     }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java Thu Nov 29 17:04:43 2012
@@ -64,7 +64,7 @@ public class HttpServiceManagerTest exte
         expect(sr.getProperty(EasyMock.eq("service.id"))).andReturn(12345l).atLeastOnce();
         c.replay();
         
-        HttpServiceManager h = new HttpServiceManager(dswContext, null, null) {
+        HttpServiceManager h = new HttpServiceManager(dswContext, null, null, null) {
 
             @Override
             protected HttpService getHttpService() {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java Thu Nov 29 17:04:43 2012
@@ -58,7 +58,7 @@ public class PojoConfigurationTypeHandle
     }
     
     private HttpServiceManager dummyHttpServiceManager() {
-        return new HttpServiceManager(null, null, null);
+        return new HttpServiceManager(null, null, null, null);
     }
 
     public void testGetPojoAddressEndpointCxf() {

Added: cxf/dosgi/trunk/samples/greeter_rest/client/.classpath
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/client/.classpath?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/client/.classpath (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/client/.classpath Thu Nov 29 17:04:43 2012
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Propchange: cxf/dosgi/trunk/samples/greeter_rest/client/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding/<project>=UTF-8

Propchange: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.core.resources.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

Propchange: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.m2e.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,2 @@
+BUNDLE_ROOT_PATH=target/classes
+eclipse.preferences.version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/client/.settings/org.eclipse.pde.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath Thu Nov 29 17:04:43 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding/<project>=UTF-8

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.core.resources.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.m2e.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,2 @@
+BUNDLE_ROOT_PATH=target/classes
+eclipse.preferences.version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl/.settings/org.eclipse.pde.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath Thu Nov 29 17:04:43 2012
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Propchange: cxf/dosgi/trunk/samples/greeter_rest/interface/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding/<project>=UTF-8

Propchange: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.core.resources.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

Propchange: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.m2e.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs Thu Nov 29 17:04:43 2012
@@ -0,0 +1,2 @@
+BUNDLE_ROOT_PATH=target/classes
+eclipse.preferences.version=1

Propchange: cxf/dosgi/trunk/samples/greeter_rest/interface/.settings/org.eclipse.pde.core.prefs
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: cxf/dosgi/trunk/systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestExportService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestExportService.java?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestExportService.java (original)
+++ cxf/dosgi/trunk/systests2/common/src/main/java/org/apache/cxf/dosgi/systests2/common/AbstractTestExportService.java Thu Nov 29 17:04:43 2012
@@ -65,35 +65,12 @@ public abstract class AbstractTestExport
             factory.setAddress("http://localhost:9090/greeter");
             factory.getServiceFactory().setDataBinding(new AegisDatabinding());
             GreeterService client = (GreeterService)factory.create();
+
             Map<GreetingPhrase, String> greetings = client.greetMe("Fred");
             Assert.assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
             System.out.println("Invocation result: " + greetings);
-            
+
             try {
-                class GreeterDataImpl implements GreeterData {
-                    private String name;
-                    private int age;
-                    private boolean exception;
-
-                    GreeterDataImpl(String n, int a, boolean ex) {
-                        name = n;
-                        age = a;
-                        exception = ex;
-                    }
-                    
-                    public String getName() {
-                        return name;
-                    }
-
-                    public int getAge() {
-                        return age;
-                    }
-
-                    public boolean isException() {
-                        return exception;
-                    }                
-                }
-                
                 GreeterData gd = new GreeterDataImpl("Stranger", 11, true);
                 client.greetMe(gd);
                 Assert.fail("GreeterException has to be thrown");
@@ -101,7 +78,8 @@ public abstract class AbstractTestExport
                 Assert.assertEquals("Wrong exception message", 
                              "GreeterService can not greet Stranger", 
                              ex.toString());
-            } 
+            }
+
         } finally {
             Thread.currentThread().setContextClassLoader(cl);            
         } 
@@ -128,4 +106,28 @@ public abstract class AbstractTestExport
         }
         throw new TimeoutException();
     }
+    
+    class GreeterDataImpl implements GreeterData {
+        private String name;
+        private int age;
+        private boolean exception;
+
+        GreeterDataImpl(String n, int a, boolean ex) {
+            name = n;
+            age = a;
+            exception = ex;
+        }
+        
+        public String getName() {
+            return name;
+        }
+
+        public int getAge() {
+            return age;
+        }
+
+        public boolean isException() {
+            return exception;
+        }                
+    }
 }

Modified: cxf/dosgi/trunk/systests2/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/pom.xml?rev=1415274&r1=1415273&r2=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/pom.xml Thu Nov 29 17:04:43 2012
@@ -140,6 +140,18 @@
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-ri-samples-greeter-rest-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>junit</groupId>

Copied: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java (from r1414835, cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/customintent/TestCustomIntent.java)
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java?p2=cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java&p1=cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/customintent/TestCustomIntent.java&r1=1414835&r2=1415274&rev=1415274&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/customintent/TestCustomIntent.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java Thu Nov 29 17:04:43 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations 
  * under the License. 
  */
-package org.apache.cxf.dosgi.systests2.multi.customintent;
+package org.apache.cxf.dosgi.systests2.multi;
 
 import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
@@ -38,7 +38,9 @@ import org.apache.cxf.aegis.databinding.
 import org.apache.cxf.dosgi.samples.greeter.GreeterService;
 import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
 import org.apache.cxf.dosgi.systests2.common.AbstractTestExportService;
-import org.apache.cxf.dosgi.systests2.multi.MultiBundleTools;
+import org.apache.cxf.dosgi.systests2.multi.customintent.AddGreetingPhraseInterceptor;
+import org.apache.cxf.dosgi.systests2.multi.customintent.CustomFeature;
+import org.apache.cxf.dosgi.systests2.multi.customintent.CustomIntentActivator;
 import org.apache.cxf.dosgi.systests2.multi.customintent.service.EmptyGreeterService;
 import org.apache.cxf.dosgi.systests2.multi.customintent.service.GreeterServiceWithCustomIntentActivator;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;

Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java?rev=1415274&view=auto
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java (added)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java Thu Nov 29 17:04:43 2012
@@ -0,0 +1,83 @@
+/** 
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements. See the NOTICE file 
+ * distributed with this work for additional information 
+ * regarding copyright ownership. The ASF licenses this file 
+ * to you 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.apache.cxf.dosgi.systests2.multi;
+
+import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
+import java.io.IOException;
+import java.net.Socket;
+import java.util.concurrent.TimeoutException;
+
+import javax.inject.Inject;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.BundleContext;
+
+@RunWith( JUnit4TestRunner.class )
+public class TestExportRestService {
+    @Inject
+    BundleContext bundleContext;
+
+    @Configuration
+    public static Option[] configure() throws Exception {
+        return new Option[] {
+                MultiBundleTools.getDistroWithDiscovery(),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+                mavenBundle().groupId("org.apache.servicemix.bundles" ).artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"),
+                mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-rest-interface").versionAsInProject(),
+                mavenBundle().groupId("org.apache.cxf.dosgi.samples").artifactId("cxf-dosgi-ri-samples-greeter-rest-impl").versionAsInProject(),
+                //mavenBundle().groupId("org.apache.cxf.dosgi.systests").artifactId("cxf-dosgi-ri-systests2-common").versionAsInProject(),
+                frameworkStartLevel(100)
+        };
+    }
+    
+    @Test
+    public void testAccessEndpoint() throws Exception {
+        // call into base test. Inheriting the test doesn't properly report failures.
+        waitPort(8080);
+    }
+    
+    private void waitPort(int port) throws Exception {
+        for (int i = 0; i < 20; i++) {
+            Socket s = null;
+            try {
+                s = new Socket((String) null, port);
+                // yep, its available
+                return;
+            } catch (IOException e) {
+                // wait 
+            } finally {
+                if (s != null) {
+                    try {
+                        s.close();
+                    } catch (IOException e) {}
+                }
+            }
+            System.out.println("Waiting for server to appear on port: " + port);
+            Thread.sleep(1000);            
+        }
+        throw new TimeoutException();
+    }
+}

Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain