You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by wi...@yahoo.com on 2014/03/15 07:51:37 UTC
Please provided ability to pass timeToKeepState from Factory methods
Hi,
for JAXRSClientFactory and WebClient
methods that allow user to pass in true for creating
thread safe proxies there is no way to pass in
long timeToKeepState to specify how long before cleaning up that state
to be passed down to ThreadLocalClientState constructor.
It's a minor change but will help alot instead of directly creating JAXRSClientFactoryBean and leveraging factory and WebClient instead.
if this is okay with you guys please let me know and i will create a jira
enhancement request and attach my patch to that.
thanks,
parwiz
Re: Please provided ability to pass timeToKeepState from Factory methods
Posted by wi...@yahoo.com.
Hi Sergey,
yes another method that just takes in long timeToKeepState is enough for our use.. I've created this jira for this
https://issues.apache.org/jira/browse/CXF-5621
and have attached a simple patch
two methods added to JAXRsClientFactory
public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, long timeToKeepState);
public static <T> T createFromModel(String baseAddress, Class<T> cls, String modelRef, List<?> providers, long timeToKeepState);
and one method added to WebClient
public static WebClient create(String baseAddress, List<?> providers, long timeToKeepState);
thanks,
parwiz
________________________________
From: Sergey Beryozkin <sb...@gmail.com>
To: users@cxf.apache.org
Sent: Monday, March 17, 2014 11:22 AM
Subject: Re: Please provided ability to pass timeToKeepState from Factory methods
Hi Parwiz,
On 15/03/14 06:51, wizpar@yahoo.com wrote:
> Hi,
>
> for JAXRSClientFactory and WebClient
> methods that allow user to pass in true for creating
> thread safe proxies there is no way to pass in
> long timeToKeepState to specify how long before cleaning up that state
>
> to be passed down to ThreadLocalClientState constructor.
>
> It's a minor change but will help alot instead of directly creating JAXRSClientFactoryBean and leveraging factory and WebClient instead.
>
> if this is okay with you guys please let me know and i will create a jira
> enhancement request and attach my patch to that.
I've been reluctant to do it because JAXRSClientFactory is overloaded
with so many helper methods. For example there are several methods
accepting boolean values, one of them 'threadSafe'...
Well, we have
public static <T> T create(String baseAddress, Class<T> cls, List<?>
providers, boolean threadSafe).
May be one more helper,
public static <T> T create(String baseAddress, Class<T> cls, List<?>
providers, int timeToKeepThreadAlive);
we can't have boolean and int; will it help you ? If yes then please
create a patch
Thanks, Sergey
>
> thanks,
> parwiz
>
Re: Please provided ability to pass timeToKeepState from Factory
methods
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Parwiz,
On 15/03/14 06:51, wizpar@yahoo.com wrote:
> Hi,
>
> for JAXRSClientFactory and WebClient
> methods that allow user to pass in true for creating
> thread safe proxies there is no way to pass in
> long timeToKeepState to specify how long before cleaning up that state
>
> to be passed down to ThreadLocalClientState constructor.
>
> It's a minor change but will help alot instead of directly creating JAXRSClientFactoryBean and leveraging factory and WebClient instead.
>
> if this is okay with you guys please let me know and i will create a jira
> enhancement request and attach my patch to that.
I've been reluctant to do it because JAXRSClientFactory is overloaded
with so many helper methods. For example there are several methods
accepting boolean values, one of them 'threadSafe'...
Well, we have
public static <T> T create(String baseAddress, Class<T> cls, List<?>
providers, boolean threadSafe).
May be one more helper,
public static <T> T create(String baseAddress, Class<T> cls, List<?>
providers, int timeToKeepThreadAlive);
we can't have boolean and int; will it help you ? If yes then please
create a patch
Thanks, Sergey
>
> thanks,
> parwiz
>