I don't know what you mean by "instantiate the service" -- I assume you
mean activating the web service provider and not the overhead involved
with the client making a SOAP call. The former should only need to be
done once (with whatever overhead it takes), with multiple clients then
accessing the same web service--in that case, as it's a one-time deal
the overhead involved shouldn't matter.
Perhaps though you're using a CXF provided sample that is expected to be
run only once to demonstrate certain functionality, so the web service
is just started and ended with that client call. In that case, my web
service tutorial
(http://www.jroller.com/gmazza/entry/web_service_tutorial) -- and many
others -- can show you how to create web services that don't start
up/shut down with each client call.
HTH,
Glen
On 01/24/2013 06:16 AM, Max Pimm 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?
I don't really know how JAX-WS works under the covers, what is actually
happening when a service is created?
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?
Thanks
Max
--
Glen Mazza
Talend Community Coders - coders.talend.com
blog: www.jroller.com/gmazza