cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r826146 - /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java
Date Sat, 17 Oct 2009 00:34:31 GMT
Author: bimargulies
Date: Sat Oct 17 00:34:30 2009
New Revision: 826146

URL: http://svn.apache.org/viewvc?rev=826146&view=rev
Log:
Make it the server factory, not the service factory, that is configured. If someone wants
to control
the service factory, they can set up a server factory and stick the desired service factory
into it.

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java?rev=826146&r1=826145&r2=826146&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsWebServicePublisherBeanPostProcessor.java
Sat Oct 17 00:34:30 2009
@@ -36,10 +36,9 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ClassHelper;
 import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
-import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
-import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactory;
@@ -86,7 +85,7 @@
     private String urlPrefix = "/services/";
     private Servlet shadowCxfServlet;
     private String prototypeDataBindingBeanName;
-    private String prototypeServiceFactoryBeanName;
+    private String prototypeServerFactoryBeanName;
     private BeanFactory beanFactory;
     
     public JaxWsWebServicePublisherBeanPostProcessor() throws SecurityException, 
@@ -152,24 +151,23 @@
     }
     
     private void createAndPublishEndpoint(String url, Object implementor) {
-        ReflectionServiceFactoryBean serviceFactory = null;
-        if (prototypeServiceFactoryBeanName != null) {
-            if (!beanFactory.isPrototype(prototypeServiceFactoryBeanName)) {
+        ServerFactoryBean serverFactory = null;
+        if (prototypeServerFactoryBeanName != null) {
+            if (!beanFactory.isPrototype(prototypeServerFactoryBeanName)) {
                 throw 
                     new IllegalArgumentException(
-                        "prototypeServiceFactoryBeanName must indicate a scope='prototype'
bean");
+                        "prototypeServerFactoryBeanName must indicate a scope='prototype'
bean");
             }
-            serviceFactory = (ReflectionServiceFactoryBean)
-                             beanFactory.getBean(prototypeServiceFactoryBeanName, 
-                                                 ReflectionServiceFactoryBean.class); 
+            serverFactory = (ServerFactoryBean)
+                             beanFactory.getBean(prototypeServerFactoryBeanName, 
+                                                 ServerFactoryBean.class); 
         } else {
-            serviceFactory = new JaxWsServiceFactoryBean();
+            serverFactory = new JaxWsServerFactoryBean();
         }
 
-        JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
-        serverFactoryBean.setServiceBean(implementor);
-        serverFactoryBean.setServiceClass(ClassHelper.getRealClass(implementor));
-        serverFactoryBean.setAddress(url);
+        serverFactory.setServiceBean(implementor);
+        serverFactory.setServiceClass(ClassHelper.getRealClass(implementor));
+        serverFactory.setAddress(url);
         
         DataBinding dataBinding = null;
         if (prototypeDataBindingBeanName != null) {
@@ -185,10 +183,9 @@
             dataBinding = new JAXBDataBinding();
         }
         
-        serverFactoryBean.setDataBinding(dataBinding);
-        serverFactoryBean.setServiceFactory(serviceFactory);
-        serverFactoryBean.setBus(getServletBus());
-        serverFactoryBean.create();
+        serverFactory.setDataBinding(dataBinding);
+        serverFactory.setBus(getServletBus());
+        serverFactory.create();
     }
 
     public void setServletConfig(ServletConfig servletConfig) {
@@ -226,18 +223,18 @@
         
     }
     
-    public String getPrototypeServiceFactoryBeanName() {
-        return prototypeServiceFactoryBeanName;
+    public String getPrototypeServerFactoryBeanName() {
+        return prototypeServerFactoryBeanName;
     }
 
     /**
-     * Set the service factory for all services launched by this bean. This must be the name
of a 
+     * Set the server factory for all services launched by this bean. This must be the name
of a 
      * scope='prototype' bean that implements 
-     * {@link org.apache.cxf.service.factory#ReflectionServiceFactoryBean}.
-     * @param prototypeServiceFactoryBeanName
+     * {@link org.apache.cxf.frontend#ServerFactoryBean}.
+     * @param prototypeServerFactoryBeanName
      */
-    public void setPrototypeServiceFactoryBeanName(String prototypeServiceFactoryBeanName)
{
-        this.prototypeServiceFactoryBeanName = prototypeServiceFactoryBeanName;
+    public void setPrototypeServerFactoryBeanName(String prototypeServerFactoryBeanName)
{
+        this.prototypeServerFactoryBeanName = prototypeServerFactoryBeanName;
     }
     
     public String getPrototypeDataBindingBeanName() {



Mime
View raw message