title: Apache CXF web services. Slow init of the server
body: <p>I am developing web services with <a href="http://cxf.apache.org/cxf-278-release-notes.html" rel="nofollow">Apache CXF 2.7.8</a>. I use wsdl2java to generate the <a href="http://en.wikipedia.org/wiki/Endpoint_interface" rel="nofollow">SEI</a> and the implementations. There are hundreds of web service endpoints. </p>
  
  <p>I use the embedded jetty. </p>
  
  <p>When the server is started it takes hours to initialize every endpoint. </p>
  
  <p>I used to publish the endpoints with <a href="http://docs.oracle.com/javase/7/docs/api/javax/xml/ws/Endpoint.html#publish%28java.lang.String,%20java.lang.Object%29" rel="nofollow">Endpoint.publish(address, implementor)</a> method, but I found this way a JAXBContext instance is created for every service. I fixed that using single JAXBContext instance for each service and it helped. </p>
  
  <p>But still, starting the server is really slow. </p>
  
  <p>In the logs this fragment is repeated hundreds of times.</p>
  
  <blockquote>
    <p>cl: AbstractObservable m: setMessageObserver [main] 20:50:48 DEBUG - Accept: <em>/</em></p>
    
    <p>cl: Headers m: logProtocolHeaders [main] 20:50:48 DEBUG - No Trust Decider for Conduit '{<a href="http://cxf.apache.org" rel="nofollow">http://cxf.apache.org</a>}TransportURIResolver.http-conduit'. An afirmative Trust Decision is assumed.</p>
    
    <p>cl: HTTPConduit$WrappedOutputStream m: makeTrustDecision [main] 20:50:48 DEBUG - Conduit '{<a href="http://cxf.apache.org" rel="nofollow">http://cxf.apache.org</a>}TransportURIResolver.http-conduit' has been (re)configured for plain http.</p>
    
    <p>cl: HTTPConduit m: setTlsClientParameters [main] 20:50:48 DEBUG - No Trust Decider configured for Conduit '{<a href="http://cxf.apache.org" rel="nofollow">http://cxf.apache.org</a>}TransportURIResolver.http-conduit'</p>
    
    <p>cl: HTTPConduit m: logConfig [main] 20:50:48 DEBUG - No Auth Supplier configured for Conduit '{<a href="http://cxf.apache.org" rel="nofollow">http://cxf.apache.org</a>}TransportURIResolver.http-conduit'</p>
    
    <p>cl: HTTPConduit m: logConfig [main] 20:50:48 DEBUG - Conduit '{<a href="http://cxf.apache.org" rel="nofollow">http://cxf.apache.org</a>}TransportURIResolver.http-conduit' has been configured for plain http.</p>
    
    <p>cl: HTTPConduit m: logConfig [main] 20:50:48 DEBUG - registering incoming observer: org.apache.cxf.transport.TransportURIResolver$1@1405d451</p>
  </blockquote>
  
  <p>Can anyone explain what this means ? And if there is some way to configure these settings globally just once ? </p>
  
  <p>Thank you.</p>