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

Freeman Fang commented on CXF-544:
----------------------------------

Hi Andrea,

>From my debug, JAXWS Client Proxy use executor assigned to JAXWS Service in 
>async invocations.
I add a test to prove this
@Test
    public void testAsyncCallUseProperAssignedExecutor() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);
        
        SOAPService service = new SOAPService(wsdl, serviceName);
        
        class TestExecutor implements Executor {
            
            private int count;
            
            public void execute(Runnable command) {
                count++;
                LOG.info("asyn call time " + count);
                command.run();
            }
            
            public int getCount() {
                return count;
            }
        }
        Executor executor = new TestExecutor();
        service.setExecutor(executor);
        assertNotNull(service);
        assertSame(executor, service.getExecutor());
        
        
        assertEquals(((TestExecutor)executor).getCount(), 0);
        try {
            Greeter greeter = (Greeter)service.getPort(portName, Greeter.class);
            for (int i = 0; i < 5; i++) {
                greeter.greetMeAsync("asyn call" + i);
            }
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
        }
        
        assertEquals(((TestExecutor)executor).getCount(), 5);
    }
Would you please review this issue and close it if it's not a bug, or give me 
more details if my understand is incorrect



> JAXWS Client Proxy does not use executor assigned to JAXWS Service in async 
> invocations
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-544
>                 URL: https://issues.apache.org/jira/browse/CXF-544
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0-RC
>            Reporter: Andrea Smyth
>         Assigned To: Freeman Fang
>             Fix For: 2.0
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to