A typical CXF init codes in client look like this: ClientProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(Service.class); > factory.setAddress(address); > Service service = (Service) factory.create(); > Client client = ClientProxy.getClient(service); > HTTPConduit conduit = (HTTPConduit) client.getConduit(); > HTTPClientPolicy policy = conduit.getClient(); > policy.setConnectionTimeout(60000); > policy.setReceiveTimeout(60000); > conduit.setClient(policy);
My question is, what instance can be reused if I need to call many web services? seems like ClientProxyFactoryBean cannot be reused because every instance of it is coressponding to a particular Service. I guess instance of Service here is the only instance can be reused, am I correct? Another question is, what's the proper values of various timeout of HTTPClientPolicy? Most important, how can I reused HTTP connection that CXF created? Many questions here, but point is, how can reduce resource occupy of CXF asap? Thanks u all very much. Bests.
