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

Bence Takács edited comment on CXF-5942 at 8/14/14 3:45 PM:
------------------------------------------------------------

I removed my comment because my conclusion was wrong.

My test setup was wrong: it is the expected behaviour that the main thread just 
submits the jobs to the executor then exits :-)
But in my test scenario it shutted down the JVM, and killed all the callback 
threads and they did not have a chance (in those dozens of milliseconds) to 
process the calls (seconds for each).

So: everything is FINE, thanks.


was (Author: bence.takacs):
I removed my comment because my conclusion was wrong.

My test setup was wrong: it is the expected behaviour that the main thread just 
submits the jobs to the executor then exits :-)

So: everything is FINE, thanks.

> Non-blocking WS call with CXF
> -----------------------------
>
>                 Key: CXF-5942
>                 URL: https://issues.apache.org/jira/browse/CXF-5942
>             Project: CXF
>          Issue Type: Wish
>          Components: Transports
>    Affects Versions: 3.0.0-milestone1
>            Reporter: Bence Takács
>            Priority: Minor
>              Labels: non-blocking
>
> It is not clear which are the use cases when one can use asynchronous client 
> calls. The possible use cases would be:
> - server-side implemented callback transport
> - server-side implemented polling transport
> - client-side only callback using non-blocking IO
> However http.asyncclient supports all of them, I see no sign of CXF 
> supporting the last one. Is there a way of calling a server this way?
> Using the configuration below I tried to call a WS this way, but CXF is 
> always looking for async binding on the server side 
> (javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info 
> for web method getDataFromWebService_Async). 
> Client configuration:
> {quote}
> <jaxws:client id="client"
>     serviceClass="my.sample.SampleWebService"
>     address="http://localhost:8080/sample-ws-cxf/SampleWebService";>
>     <jaxws:properties>
>         <entry key="javax.xml.ws.client.connectionTimeout" value="10" />
>         <entry key="javax.xml.ws.client.receiveTimeout" value="11000" />
>         <entry key="org.apache.cxf.transport.http.async.usePolicy" 
> value="ALWAYS" />
>         <entry key="org.apache.cxf.transport.http.async.ioThreadCount" 
> value="2" /> 
>     </jaxws:properties>
> </jaxws:client>
> {quote}
> code:
> {quote}{noformat}
> client.getDataFromWebService_Async("" + id.getAndIncrement(), new 
> AsyncHandler<Person>() {
>     @Override
>     public void handleResponse(Response<Person> resp) {
>         Person person;
>         try {
>             person = resp.get();
>             ...
>         } catch (InterruptedException | ExecutionException e) {
>             ...
>         }
>     }
> });
> {noformat}{quote}
> If I log out the conduit, it tells that it is: 
> org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit ( 
> log.info(ClientProxy.getClient(client).getConduit().getClass().getName()); )
> I'm using cxf 3.0.1, and httpasyncclient version 4.0.1 with spring 
> 3.2.2.RELEASE



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to