Can I reuse ReflectionServiceFactoryBean?


On Fri, May 12, 2017 at 6:42 PM, Sigmond Hola <[email protected]> wrote:

> Any any help me, pls?
>
> Thank u so much!
>
> On Wed, May 10, 2017 at 4:27 PM, Sigmund God <[email protected]>
> wrote:
>
>> 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.
>>
>
>

Reply via email to