Hi,
We used the Camel Jetty as the https server and Camel http component as the
https client. then for these component, we must set the keystore/truststore
parameter. below is example:
@Override
public void configure() throws Exception {
JettyHttpComponent jettyComponent =
getContext().getComponent("jetty", JettyHttpComponent.class);
SslSelectChannelConnector sslConnector = new
SslSelectChannelConnector();
SslContextFactory sslFactory = sslConnector.getSslContextFactory();
sslFactory.setNeedClientAuth(true);
*sslFactory.setKeyStore(keyStorePath)*;
sslFactory.setKeyManagerPassword(keyPassword);
sslFactory.setKeyStorePassword(keyStorePassword);
*sslFactory.setTrustStore(trustStorePath)*;
sslFactory.setTrustStorePassword(trustStorePassword);
Map<Integer, SslSelectChannelConnector> connectors = new
HashMap<Integer, SslSelectChannelConnector>();
connectors.put(4443, sslConnector);
jettyComponent.setSslSocketConnectors(connectors);
from("jetty:https://0.0.0.0:4443/myHttpService/")
.convertBodyTo(StreamSource.class)
.inOut(notificationDispatcherEP);
}
When the servicemix started, this keyStore/trustStore will be read to
Memory. then if I changed the keyStore/trustStore (such as: importing some
trust certification), the changed information will not be noted by
servicemix so that I must restart my application to read again. How can I do
then the Camel Jetty/http component can keep updated when the
keyStore/trustStore updated?
Thanks.
Regards.
Leng Yong.
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Camel-Jetty-component-dynamic-configuration-tp5684635.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.