Hi,

(1) looks as a bag for me, should be investigated
(2) you can look into 
https://svn.apache.org/repos/asf/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java
 system tests and try to find a difference with your code.

Regards,
Andrei.

> -----Original Message-----
> From: Jose María Zaragoza [mailto:[email protected]]
> Sent: Dienstag, 21. Januar 2014 18:03
> To: [email protected]
> Subject: Re: Questions about asynchronous invocation
> 
> Hi
> 
> 2014/1/20 Jose María Zaragoza <[email protected]>:
> > Hello:
> >
> > I'm using Apache CXF 2.7.8 and I've got a questions about asynchronous
> > invocation:
> >
> >
> > 1) When I use a standalone client with the next code :
> >
> > //
> >  Future<?> future = client.sendAsync(request, new
> > EmailAsyncHandler());
> >
> >  while (!future.isDone())
> >  {
> >      System.out.println("Waiting ...");
> >
> > }
> > System.out.println("Done");
> >
> >
> > the JVM process never is finished although "Done" log is printed
> >
> > About jvisualm , there is a thread running
> >
> > java.lang.Thread.State: RUNNABLE
> > at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method) at
> >
> sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.ja
> > va:273) at
> >
> sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorI
> > mpl.java:255) at
> > sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:136)
> > at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
> > - locked <0x23f296c8> (a sun.nio.ch.Util$2)
> > - locked <0x23f296d8> (a java.util.Collections$UnmodifiableSet)
> > - locked <0x23f29650> (a sun.nio.ch.WindowsSelectorImpl) at
> > sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
> > at
> > org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(
> > AbstractMultiworkerIOReactor.java:366)
> > at
> > org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduitFactory$1.ru
> > n(AsyncHTTPConduitFactory.java:340)
> > at java.lang.Thread.run(Thread.java:662)
> >
> > I know that I can do System.exit(0) , but I wonder why if Future
> > object is done , Thread is not finished. What is the reason ? How I
> > can finish this thread ? Could be a problem if asynchronous client is
> > executed in a web container ?
> >
> >
> >
> > 2) I'm using @UseAsyncMethod annotation in synchronous method
> > signature like
> >
> > @UseAsyncMethod
> > public EmailResponse send(EmailRequest emailRequest)
> >
> > but asynchronous implementation like
> >
> > public Future<?> sendAsync(EmailRequest emailRequest,
> > AsyncHandler<EmailResponseWrapper> sendHandler)
> >
> > is never invoked , did I forget something ?
> >
> > I using cxf-rt-transports-http-hc module
> >
> >
> > Thanks and regards
> 
> 
> 
> Any suggestion/idea ?
> 
> Thanks

Reply via email to