On Jan 24, 2013, at 6:16 AM, Max Pimm <[email protected]> wrote: > I am using a JAX-WS frontend generated using the CXF Maven Codegen plugin. > > Each time i instantiate the service i see a log message that looks like > this: > > INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] > (http--0.0.0.0-8080-3) Creating Service XXXX from WSDL XXXXX > > The WSDL is on the class path and i understand that CXF uses a cache for > that but is the creation of the service from the WSDL an expensive > operation?
It CAN be depending on the size of the service, etc…. > I don't really know how JAX-WS works under the covers, what is actually > happening when a service is created? Well, we pretty much go through the WSDL and the Service interface and do some checks to make sure the methods in the interface line up with the operations in the WSDL, the parameters are properly mapped, check as to use BARE or WRAPPED style, etc…. We also may need to create a JAXBContext (which may also be cached), etc… > If this operation is expensive or the returned service object large (in > terms of memory) what would be the best way to implement caching of the > service object. Would i need to implement a pool or are calls to service > methods thread safe? http://cxf.apache.org/faq.html#FAQ-AreJAXWSclientproxiesthreadsafe%3F -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
