generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce quarkus.cxf[.client.myClient].http-conduit-factory as a
configurable workaround for #992 CXF clients based on java.net.http.HttpClient leak threads
- Loading branch information
Showing
10 changed files
with
167 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...nsions/core/runtime/src/main/java/io/quarkiverse/cxf/URLConnectionHTTPConduitFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkiverse.cxf; | ||
|
||
import java.io.IOException; | ||
|
||
import org.apache.cxf.Bus; | ||
import org.apache.cxf.service.model.EndpointInfo; | ||
import org.apache.cxf.transport.http.HTTPConduit; | ||
import org.apache.cxf.transport.http.HTTPConduitFactory; | ||
import org.apache.cxf.transport.http.HTTPTransportFactory; | ||
import org.apache.cxf.transport.http.URLConnectionHTTPConduit; | ||
import org.apache.cxf.ws.addressing.EndpointReferenceType; | ||
|
||
public class URLConnectionHTTPConduitFactory implements HTTPConduitFactory { | ||
@Override | ||
public HTTPConduit createConduit(HTTPTransportFactory f, Bus bus, EndpointInfo endpointInfo, EndpointReferenceType target) | ||
throws IOException { | ||
return new URLConnectionHTTPConduit(bus, endpointInfo, target); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
integration-tests/mtom/src/test/java/io/quarkiverse/cxf/it/ws/mtom/server/MtomIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
package io.quarkiverse.cxf.it.ws.mtom.server; | ||
|
||
import org.apache.cxf.BusFactory; | ||
import org.apache.cxf.transport.http.HTTPConduitFactory; | ||
|
||
import io.quarkiverse.cxf.URLConnectionHTTPConduitFactory; | ||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class MtomIT extends MtomTest { | ||
|
||
public MtomIT() { | ||
/* | ||
* quarkus.cxf.http-conduit-factory = URLConnectionHTTPConduitFactory is not effective for the JVM | ||
* running the native tests. Thus we have to set the ConduitFactory manually. | ||
*/ | ||
BusFactory.getDefaultBus().setExtension(new URLConnectionHTTPConduitFactory(), HTTPConduitFactory.class); | ||
} | ||
} |