cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r463142 - /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
Date Thu, 12 Oct 2006 06:42:38 GMT
Author: tli
Date: Wed Oct 11 23:42:36 2006
New Revision: 463142

URL: http://svn.apache.org/viewvc?view=rev&rev=463142
Log:
avoid duplicate endpoint creation for non-code-first case

Modified:
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java?view=diff&rev=463142&r1=463141&r2=463142
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java
Wed Oct 11 23:42:36 2006
@@ -62,14 +62,17 @@
             }
 
             EndpointInfo ei = service.getServiceInfo().getEndpoint(endpointName);
-
+            Endpoint ep = null;
             if (ei == null) {
                 ei = createEndpoint();
             } else if (address != null) {
                 ei.setAddress(address); 
-            }
+            }                        
             
-            Endpoint ep = serviceFactory.createEndpoint(ei);
+            ep = service.getEndpoints().get(ei.getName());
+            if (ep == null) {
+                ep = serviceFactory.createEndpoint(ei);
+            }
             service.getEndpoints().put(ep.getEndpointInfo().getName(), ep);
             server = new ServerImpl(bus, ep, new ChainInitiationObserver(ep, bus));
             



Mime
View raw message