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

Nicolas Filotto commented on CAMEL-19753:
-----------------------------------------

Alternatively, you can configure it in pure XML in your Spring Boot 
configuration file as next:

{code:java}

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:camel="http://camel.apache.org/schema/spring";
       xmlns:context="http://www.springframework.org/schema/context";
       xmlns:sec="http://cxf.apache.org/configuration/security";
       xmlns:http="http://cxf.apache.org/transports/http/configuration";       
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd
           http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
           http://cxf.apache.org/configuration/security 
http://cxf.apache.org/schemas/configuration/security.xsd
           http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd";>
...
    <camel:sslContextParameters id="sslContextParameters">
        <camel:trustManagers>
            <camel:keyStore type="JKS" 
resource="file://Users/nicolasfilotto/test/CAMEL-19753/test-cxfrs-https/truststore.jks"
                      password="cspass"/>
        </camel:trustManagers>
    </camel:sslContextParameters>
...
{code}



> Too many TLS connections opened when cxfrs calling a service via HTTPS
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-19753
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19753
>             Project: Camel
>          Issue Type: Task
>          Components: camel-cxf
>    Affects Versions: 3.20.6
>            Reporter: Xilai Dai
>            Assignee: Nicolas Filotto
>            Priority: Minor
>         Attachments: TLS_connections.png, test-cxfrs-https.zip, 
> test-server.zip
>
>
> Given a simple route:
> {code}
>           from("timer:cTimer_1" + "?period=" + 1 + "&repeatCount=" + 200 + 
> "&delay=" + 100)
>                               .setHeader(org.apache.camel.Exchange.HTTP_PATH, 
> simple(""))
>                               
> .setHeader(org.apache.camel.Exchange.HTTP_METHOD, constant("GET"))
>                               
> .setHeader(org.apache.camel.Exchange.ACCEPT_CONTENT_TYPE, 
> constant("application/json"))
>                               .inOut("cxfrs://" + 
> "https://localhost:9001/services/B"; + "?providers=#providers"
>                                                               + 
> "&loggingFeatureEnabled=false")
>                               .to("log:cxfrs_eval_demo_service.cLog_1" + 
> "?level=WARN" + "&showAll=" + true + "&multiline=" + true); 
> {code}
> there are many TLS connections opened when running this route.
> whereas, the camel-http as a provider works as expected (only few TLS 
> connections opened as expected)
> {code}
>       from("timer:cTimer_2" + "?period=" + 1 + "&repeatCount=" + 200 + 
> "&delay=" + 100)
>                               .setHeader("CamelHttpMethod", constant("GET"))
>                               .to("https://localhost:9001/services/B";)
>                               .to("log:cxfrs_eval_demo_service.cLog_1" + 
> "?level=WARN" + "&showAll=" + true + "&multiline=" + true);  
> {code}
> Attached test-cxfrs-https.zip , test-server.zip for easily reproduce the 
> issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to