cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7057) CXF JAXRSClientFactoryBean proxy async support
Date Tue, 27 Sep 2016 13:43:20 GMT

    [ https://issues.apache.org/jira/browse/CXF-7057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526159#comment-15526159
] 

Sergey Beryozkin commented on CXF-7057:
---------------------------------------

Hi Neal, 
the proxy callback might be registered at the proxy creation time but it is not what can really
be recommended - instead a request thread specific callback has to be registered:
{code:java}
SomeInterface proxy = getProxyGeneratedBy3rdParty();

// the following is entirely under the client code control:
WebClient.getConfig(proxy).getRequestContext().put(InvocationCallback.class.getName(), callback);
{code}

Can you try that please ?

Sergey

> CXF JAXRSClientFactoryBean proxy async support
> ----------------------------------------------
>
>                 Key: CXF-7057
>                 URL: https://issues.apache.org/jira/browse/CXF-7057
>             Project: CXF
>          Issue Type: Wish
>          Components: JAX-RS
>    Affects Versions: 3.1.6
>         Environment: Linux Mac
>            Reporter: Neal Hu
>             Fix For: 3.1.8
>
>
> Say we have resource interface org.apache.cxf.Resource, and its impl org.apache.cxf.ResourceImpl,
we can create client proxy via JAXRSClientFactoryBean as below;
> {code:java}
> Class<T> type = org.apache.cxf.Resource.class;
> JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
>         bean.setAddress(baseAddress);
>         bean.setServiceClass(type);
>         bean.setProviders(providers);
>         bean.setFeatures(features);
>         bean.setThreadSafe(true);
>         T proxy = bean.create(type);
> {code}
> Then invoke the method via proxy.method1.
> As we know the spec client api can invoke via async mode, my question is if the dynamic
proxy mode support async mode.
> We are developing micro service framework which based on CXF RS,  and the  comsumer's
invoker is dynamicly generated by the clientfactory.create. Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message