Author: dkulp Date: Thu Oct 29 15:03:26 2009 New Revision: 830989 URL: http://svn.apache.org/viewvc?rev=830989&view=rev Log: Merged revisions 830982 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes
................ r830982 | dkulp | 2009-10-29 10:55:07 -0400 (Thu, 29 Oct 2009) | 10 lines Merged revisions 830968 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r830968 | dkulp | 2009-10-29 10:41:19 -0400 (Thu, 29 Oct 2009) | 2 lines [CXF-1282, CXF-1283] Fix a bug where setting an executor may result in a hang. ........ ................ Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java?rev=830989&r1=830988&r2=830989&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java (original) +++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/ServiceInvokerInterceptor.java Thu Oct 29 15:03:26 2009 @@ -93,7 +93,15 @@ invocation.run(); } else { exchange.put(Executor.class, executor); - FutureTask<Object> o = new FutureTask<Object>(invocation, null); + FutureTask<Object> o = new FutureTask<Object>(invocation, null) { + @Override + protected void done() { + super.done(); + synchronized (this) { + this.notifyAll(); + } + } + }; synchronized (o) { executor.execute(o); if (!exchange.isOneWay()) { Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?rev=830989&r1=830988&r2=830989&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java (original) +++ cxf/branches/2.1.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Thu Oct 29 15:03:26 2009 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.concurrent.Executor; import javax.wsdl.Definition; import javax.wsdl.factory.WSDLFactory; @@ -144,6 +145,11 @@ Hello service = new Hello(); EndpointImpl ep = new EndpointImpl(getBus(), service, (String) null); + ep.setExecutor(new Executor() { + public void execute(Runnable r) { + new Thread(r).start(); + } + }); ep.publish("local://localhost:9090/hello"); Node res = invoke("local://localhost:9090/hello",
