cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1232046 - in /cxf/dosgi/trunk: distribution/multi-bundle/ distribution/multi-bundle/src/main/resources/ distribution/single-bundle/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/hand...
Date Mon, 16 Jan 2012 16:02:57 GMT
Author: sergeyb
Date: Mon Jan 16 16:02:57 2012
New Revision: 1232046

URL: http://svn.apache.org/viewvc?rev=1232046&view=rev
Log:
Some cleanup/fixes for HTTP Context related deployments

Modified:
    cxf/dosgi/trunk/distribution/multi-bundle/pom.xml
    cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml
    cxf/dosgi/trunk/distribution/single-bundle/pom.xml
    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/AbstractPojoConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/TopologyManager.java
    cxf/dosgi/trunk/parent/pom.xml

Modified: cxf/dosgi/trunk/distribution/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/pom.xml?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/pom.xml Mon Jan 16 16:02:57 2012
@@ -147,17 +147,17 @@
     <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-spi</artifactId>
-      <version>1.0.8</version>
+      <version>${pax.web.version}</version>
     </dependency>
     <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-runtime</artifactId>
-      <version>1.0.8</version>
+      <version>${pax.web.version}</version>
     </dependency>
     <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-jetty</artifactId>
-      <version>1.0.8</version>
+      <version>${pax.web.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.servicemix.specs</groupId>

Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml Mon Jan
16 16:02:57 2012
@@ -20,9 +20,9 @@
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-osgi-core-${spring.osgi.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-osgi-extender-${spring.osgi.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/jetty-all-server-${jetty.version}.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-spi-1.0.8.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-runtime-1.0.8.jar</bundle>
-  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-jetty-1.0.8.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-spi-${pax.web.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-runtime-${pax.web.version}.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/pax-web-jetty-${pax.web.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.jaxb-impl-${jaxbimpl.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.wsdl4j-${wsdl4j.bundle.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.xmlsec-${xmlsec.bundle.version}.jar</bundle>

Modified: cxf/dosgi/trunk/distribution/single-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/single-bundle/pom.xml?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/single-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/single-bundle/pom.xml Mon Jan 16 16:02:57 2012
@@ -137,7 +137,7 @@
     <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-runtime</artifactId>
-      <version>1.0.8</version>
+      <version>${pax.web.version}</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty.aggregate</groupId>
@@ -147,7 +147,7 @@
     <dependency>
       <groupId>org.ops4j.pax.web</groupId>
       <artifactId>pax-web-jetty</artifactId>
-      <version>1.0.8</version>
+      <version>${pax.web.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.servicemix.specs</groupId>

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=1232046&r1=1232045&r2=1232046&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 Mon
Jan 16 16:02:57 2012
@@ -42,6 +42,7 @@ public class Constants {
     public static final String SERVICE_NAME = WSDL_CONFIG_PREFIX + ".service.name";
     public static final String PORT_NAME = WSDL_CONFIG_PREFIX + ".port.name";
     public static final String WSDL_LOCATION = WSDL_CONFIG_PREFIX + ".location";
+    public static final String WSDL_HTTP_SERVICE_CONTEXT = WSDL_CONFIG_PREFIX + ".httpservice.context";
     // Provider prefix
     public static final String PROVIDER_PREFIX = "org.apache.cxf";
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
Mon Jan 16 16:02:57 2012
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -36,7 +35,6 @@ import org.apache.cxf.dosgi.dsw.Constant
 import org.apache.cxf.dosgi.dsw.OsgiUtils;
 import org.apache.cxf.dosgi.dsw.qos.IntentMap;
 import org.apache.cxf.endpoint.AbstractEndpointFactory;
-import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
@@ -75,17 +73,6 @@ public abstract class AbstractPojoConfig
       }
     }
 
-    Map<String, String> registerPublication(Server server, String[] intents) {
-        Map<String, String> publicationProperties = new HashMap<String, String>();
-        publicationProperties.put(Constants.EXPORTED_CONFIGS, Constants.WS_CONFIG_TYPE);
-
-        String intentsValue = OsgiUtils.formatIntents(intents);
-        if (intentsValue.length() > 0) {
-            publicationProperties.put(Constants.INTENTS, intentsValue);
-        }
-        return publicationProperties;
-    }
-
     String [] applyIntents(BundleContext dswContext,
                            BundleContext callingContext,
                            List<AbstractFeature> features,

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
Mon Jan 16 16:02:57 2012
@@ -36,8 +36,6 @@ import org.apache.cxf.dosgi.dsw.Constant
 import org.apache.cxf.dosgi.dsw.OsgiUtils;
 import org.apache.cxf.dosgi.dsw.service.ExportRegistrationImpl;
 import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.endpoint.ServerLifeCycleListener;
-import org.apache.cxf.endpoint.ServerLifeCycleManager;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.jaxb.JAXBDataBinding;
@@ -130,18 +128,7 @@ public class HttpServiceConfigurationTyp
             return;
         }
 
-        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
-        HttpService httpService = getHttpService();
-        try {
-            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(),

-                                       getHttpContext(dswContext, httpService));
-            registerUnexportHook(exportRegistration, contextRoot);
-            
-            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
-        } catch (Exception e) {
-            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet",
e);
-        }
-        Bus bus = cxf.getBus();
+        Bus bus = registerServletAndGetBus(contextRoot, dswContext, exportRegistration);
         final ServiceReference sref = exportRegistration.getExportedService();
         DataBinding databinding;
         String dataBindingImpl = (String)exportRegistration.getExportedService()
@@ -181,9 +168,6 @@ public class HttpServiceConfigurationTyp
             Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
             Server server = factory.create();
             
-            // TODO: does this still make sense ?!? 
-            registerStopHook(bus, httpService, server, contextRoot, Constants.WS_HTTP_SERVICE_CONTEXT);
-            
             endpdDesc = new EndpointDescription(endpointProps);
             exportRegistration.setServer(server);
      
@@ -197,11 +181,21 @@ public class HttpServiceConfigurationTyp
         
      
     }
-
-    protected Map<String, String> registerPublication(Server server, String[] intents,
String address) {
-        Map<String, String> publicationProperties = super.registerPublication(server,
intents);
-        publicationProperties.put(Constants.WS_ADDRESS_PROPERTY, address);
-        return publicationProperties;
+    
+    protected Bus registerServletAndGetBus(String contextRoot, BundleContext dswContext,
+    		ExportRegistrationImpl exportRegistration) {
+    	CXFNonSpringServlet cxf = new CXFNonSpringServlet();
+        HttpService httpService = getHttpService();
+        try {
+            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(),

+                                       getHttpContext(dswContext, httpService));
+            registerUnexportHook(exportRegistration, contextRoot);
+            
+            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
+        } catch (Exception e) {
+            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet",
e);
+        }
+        return cxf.getBus();
     }
 
     protected String constructAddress(BundleContext ctx, String contextRoot) {
@@ -238,10 +232,13 @@ public class HttpServiceConfigurationTyp
     }
 
     protected String getServletContextRoot(Map sd, Class<?> iClass) {
-        String context = OsgiUtils.getProperty(sd, Constants.WS_HTTP_SERVICE_CONTEXT);
+    	String context = OsgiUtils.getProperty(sd, Constants.WS_HTTP_SERVICE_CONTEXT);
         if (context == null) {
             context = OsgiUtils.getProperty(sd, Constants.WS_HTTP_SERVICE_CONTEXT_OLD);
         }
+        if (context == null) {
+            context = OsgiUtils.getProperty(sd, Constants.WSDL_HTTP_SERVICE_CONTEXT);
+        }
 
         if (context == null) {
             context = "/" + iClass.getName().replace('.', '/');
@@ -250,29 +247,6 @@ public class HttpServiceConfigurationTyp
         return context;
     }
 
-    protected void registerStopHook(Bus bus, final HttpService httpService, Server theServer,
-                                    final String contextRoot, final String propertyName)
{
-        if (bus != null) {
-            theServer.getEndpoint().put(propertyName, contextRoot);
-            ServerLifeCycleListener stopHook = new ServerLifeCycleListener() {
-                public void stopServer(Server s) {
-                    Object contextProperty = s.getEndpoint().get(propertyName);
-                    if (contextProperty != null && contextProperty.equals(contextRoot))
{
-                        httpService.unregister(contextRoot);
-                    }
-                }
-
-                public void startServer(Server s) {
-                }
-            };
-            ServerLifeCycleManager mgr = bus.getExtension(ServerLifeCycleManager.class);
-            if (mgr != null) {
-                mgr.registerListener(stopHook);
-            }
-        }
-    }
-
-
     protected HttpContext getHttpContext(BundleContext bundleContext, HttpService httpService)
{
 
         HttpContext httpContext = httpService.createDefaultHttpContext();

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
Mon Jan 16 16:02:57 2012
@@ -18,11 +18,8 @@
  */
 package org.apache.cxf.dosgi.dsw.handlers;
 
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
@@ -34,22 +31,14 @@ import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
 import org.apache.cxf.jaxrs.model.UserResource;
-import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.http.HttpContext;
-import org.osgi.service.http.HttpService;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 
 public class JaxRSHttpServiceConfigurationTypeHandler extends HttpServiceConfigurationTypeHandler
{
     private static final Logger LOG = LogUtils.getL7dLogger(JaxRSHttpServiceConfigurationTypeHandler.class);
 
-    Set<ServiceReference> httpServiceReferences = new CopyOnWriteArraySet<ServiceReference>();
-
     protected JaxRSHttpServiceConfigurationTypeHandler(BundleContext dswBC,
-
-    Map<String, Object> handlerProps) {
+                                                       Map<String, Object> handlerProps)
{
         super(dswBC, handlerProps);
     }
 
@@ -63,17 +52,7 @@ public class JaxRSHttpServiceConfigurati
             return;
         }
 
-        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
-        HttpService httpService = getHttpService();
-        try {
-            HttpContext httpContext = getHttpContext(dswContext, httpService);
-            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(),
httpContext);
-            registerUnexportHook(exportRegistration, contextRoot);
-            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
-        } catch (Exception e) {
-            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet",
e);
-        }
-        Bus bus = cxf.getBus();
+        Bus bus = registerServletAndGetBus(contextRoot, dswContext, exportRegistration);
 
         JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
         factory.setBus(bus);
@@ -95,8 +74,6 @@ public class JaxRSHttpServiceConfigurati
 
         String address = constructAddress(dswContext, contextRoot);
 
-        
-
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
             String[] intents = new String[] {
@@ -112,7 +89,6 @@ public class JaxRSHttpServiceConfigurati
             
             Thread.currentThread().setContextClassLoader(JAXRSServerFactoryBean.class.getClassLoader());
             Server server = factory.create();
-            registerStopHook(bus, httpService, server, contextRoot, Constants.RS_HTTP_SERVICE_CONTEXT);
 
             endpdDesc = new EndpointDescription(endpointProps);
             exportRegistration.setServer(server);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
Mon Jan 16 16:02:57 2012
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.databinding.DataBinding;
@@ -40,7 +41,7 @@ import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 
-public class WsdlConfigurationTypeHandler extends AbstractPojoConfigurationTypeHandler {
+public class WsdlConfigurationTypeHandler extends HttpServiceConfigurationTypeHandler {
     private static final String CONFIGURATION_TYPE = "wsdl";
     private static final Logger LOG = LogUtils.getL7dLogger(WsdlConfigurationTypeHandler.class);
     
@@ -144,19 +145,28 @@ public class WsdlConfigurationTypeHandle
     	}
         
     	String address = getPojoAddress(sd, iClass);
+    	String contextRoot = null;
         if (address == null) {
-            LOG.warning("Remote address is unavailable");
+        	contextRoot = getServletContextRoot(sd, iClass);
+            if (contextRoot == null) {
+                LOG.warning("Remote address is unavailable");
+            }
             exportRegistration.setException(new Throwable("Remote address is unavailable"));
             return;
         }
 
         LOG.info("Creating a " + iClass.getName() + " endpoint from CXF PublishHook, address
is " + address);
 
+        Bus bus = null;
+        if (contextRoot != null) {
+        	bus = registerServletAndGetBus(contextRoot, dswContext, exportRegistration);
+        }
+        
         DataBinding databinding = new JAXBDataBinding();
         JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
 
         factory.setServiceClass(iClass);
-        factory.setAddress(address);
+        factory.setAddress(address != null ? address : "/");
         factory.getServiceFactory().setDataBinding(databinding);
         factory.setServiceBean(serviceBean);
 
@@ -169,6 +179,9 @@ public class WsdlConfigurationTypeHandle
         }
         
         factory.setWsdlURL(wsdlURL.toString());
+        if (bus != null) {
+        	factory.setBus(bus);
+        }
         
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
Mon Jan 16 16:02:57 2012
@@ -120,10 +120,7 @@ public class ExportRegistrationImpl impl
     }
     
     public EndpointDescription getEndpointDescription() {
-        if (!closed)
-            return endpointDescription;
-        else
-            return null;
+        return endpointDescription;
     }
 
     public Throwable getException() {
@@ -183,10 +180,12 @@ public class ExportRegistrationImpl impl
     }
 
     public ExportReference getExportReference() {
-        if(exportReference==null){
-            exportReference = new ExportReferenceImpl(this);
-        }
-        return exportReference;
+    	synchronized (this) {
+	        if(exportReference==null){
+	            exportReference = new ExportReferenceImpl(this);
+	        }
+	        return exportReference;
+    	}
     }
 
     protected EndpointDescription getEndpointDescriptionAlways() {

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/TopologyManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/TopologyManager.java?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/TopologyManager.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/TopologyManager.java
Mon Jan 16 16:02:57 2012
@@ -366,7 +366,9 @@ public class TopologyManager {
             for (ExportRegistration exReg : exportRegistrations) {
 
                 // FIXME!!!!!!!!!!!!! There needs to be a better way ?!?!?!
-                Map props = exReg.getExportReference().getExportedEndpoint().getProperties();
+            	ExportReference ref = exReg.getExportReference(); 
+            	EndpointDescription endpoint = ref.getExportedEndpoint(); 
+                Map props = endpoint.getProperties();
                 Dictionary d = new Hashtable(props);
 
                 for (Filter filter : filters) {

Modified: cxf/dosgi/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/parent/pom.xml?rev=1232046&r1=1232045&r2=1232046&view=diff
==============================================================================
--- cxf/dosgi/trunk/parent/pom.xml (original)
+++ cxf/dosgi/trunk/parent/pom.xml Mon Jan 16 16:02:57 2012
@@ -33,7 +33,7 @@
         <remote.service.admin.interfaces.version>1.0.0</remote.service.admin.interfaces.version>
 
         <servicemix.specs.version>1.9.0</servicemix.specs.version>
-
+        <pax.web.version>1.0.3</pax.web.version>
         <servlet.version>3.0</servlet.version>
         <log4j.version>1.2.15</log4j.version>
         <jetty.version>7.4.2.v20110526</jetty.version>



Mime
View raw message