Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7900661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:01:31+00:00 2026-06-03T09:01:31+00:00

We meet a problem when we use https in camel-jetty. Once the key store

  • 0

We meet a problem when we use https in camel-jetty. Once the key store file is changed(like delete or add a certification), how can we make the change take effect? Seems like by default, camel-jetty won’t reload the change dynamically.

The sample code:

JettyHttpComponent jettyComponent = getContext().getComponent("jetty", JettyHttpComponent.class);
SslSelectChannelConnector sslConnector = new SslSelectChannelConnector();
SslContextFactory sslFactory = sslConnector.getSslContextFactory();
sslFactory.setNeedClientAuth(true);
sslFactory.setKeyStore("d:" + File.separator +"serverkeystore");
sslFactory.setKeyManagerPassword("serverkey");
sslFactory.setKeyStorePassword("serverkeystore");
sslFactory.setTrustStore("d:" + File.separator +"servertruststore");
sslFactory.setTrustStorePassword("servertruststore");
Map<Integer, SslSelectChannelConnector> connectors = new HashMap<Integer, SslSelectChannelConnector>();
connectors.put(443, sslConnector);
jettyComponent.setSslSocketConnectors(connectors);   
from("jetty:https://0.0.0.0/httpsservice")
    .id("httpsserver")
    .process(new Processor(){
        public void process(Exchange exchange) throws Exception {
            exchange.getOut().setBody("OK");
            exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 200);
        }
    });

But when we change the key store file dynamically, unless restart the application, the change won’t take effect. Is there any way to make the change take effect?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:01:33+00:00Added an answer on June 3, 2026 at 9:01 am

    You can build an SSLContext (and pass it via an SslContextFactory) using a custom X509KeyManager and a custom X509TrustManager that will change its return values dynamically, instead of being loaded once and for all.

    For performance reasons, instead of reloading the keystores every time one of their methods are called, I would cache the result and reload it once in a while only (perhaps every 5 minutes, this really depends on the usage you expect).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use jQuery to add dynamic Add/Remove row function, but I meet
I want to use link_to wrap some HTML,but I meet some problem. <%= link_to
I meet a weired problem when I use maven. I execute the following code
I meet a problem yesterday. Maybe it's because it is April 1st... but it
I meet a problem about type contraint of c# now. I wrote a pair
I started my first backbone.js app today and I meet a first problem. I
I am using ext do draw charts in the browser,I meet a problem: I
I ask a question about using XPath function there But I meet a problem
I meet a problem when I try to install module omniORB&omniORBpy to a system,
I meet some problem when locate the resources such as css js img in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.