Hi,

I have a servlet-based application which uses CXF as a client to call a
remote web service.

I am using the following code to create my webservice object within the
servlet code:

<snippet>
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setServiceClass(WebServiceInterface.class);
    factory.setAddress(wsConfig.getWSDLUrl());
    webService = (WebServiceInterface) factory.create();
</snippet>

I then call methods (usually just one) on the webService object, and then
the servlet thread completes normally and I do not do anything explicitly to
close this webService object.

My question is: should I be closing this webService object explicitly?  It
this tying up resources?

Also, is the JaxWsProxyFactoryBean thread safe?  I.e. could I have an
initialised JaxWsProxyFactoryBean object as a static member of the servlet I
am using?

Regards,

Matt
-- 
View this message in context: 
http://www.nabble.com/Resource-management-and-cleanup-tp19644012p19644012.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to