You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by tl...@apache.org on 2006/10/12 08:42:38 UTC

svn commit: r463142 - /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java

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));
             



Re: svn commit: r463142 - /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java

Posted by James Mao <ja...@iona.com>.
I also found this problem, during every server launching, the binding 
will be created twice, thanks for fix.
Should improved the performance.

Cheers,
James.
> 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
>
>   

Re: svn commit: r463142 - /incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ServerFactoryBean.java

Posted by James Mao <ja...@iona.com>.
I also found this problem, during every server launching, the binding 
will be created twice, thanks for fix.
Should improved the performance.

Cheers,
James.
> 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
>
>