You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Christian Schneider <ch...@die-schneider.net> on 2014/12/12 15:30:07 UTC

Temporary branch for camel-jetty 9

I now committed a first version of a camel-jetty for jetty 9. It works 
for the most part but some tests still fail (7 failures, 7 errors). I 
would be happy about any help getting those resolved. I listed the main 
problems below.

To test checkout the temp-jetty9 branch and run mvn clean install 
-Pjetty9 in camel-jetty.

So after that step we would need to create the modules. I propose the 
following setup:

camel-jetty-common
camel-jetty-8
camel-jetty-9

 From what I found most changes are to be expected in 
JettyContentExchange. So we should make it an interface and supply 
implementations for jetty8 and 9 in the respective modules.

The other bigger chunk of changes are in JettyComponent where the 
connectors are created. So we should move that out of this class into a 
Factory with interface and version specific implementations.

The tests are identical for the most part. So we should move them to 
common or a separate module and find a way to execute them in the test 
run of the specific modules. No idea how to execute them there with 
minimal effort. Any ideas?

The camel-jetty8 and 9 modules would pull up the component so they would 
contain a JettyComponent8/9 that extends JettyComponent and configures 
the specific classes.
Both these specific module would work on the jetty: prefix. So we need 
to make sure only one is loaded.

In OSGi we should be able to leverage conditional features to do that.

So WDYT?

Christian

-----

Here are some of the problems I still face:

1) Maps with custom socket or ssl connectors:

JettyComponent
     protected Map<Integer, Connector> sslSocketConnectors;
     protected Map<Integer, Connector> socketConnectors;

Not sure how to use Connector for jetty9. To create a Connector you need 
to supply the Server in the constructor which is not (and should not be) 
visible outside of JettyComponent.

I tried some workarounds but they are not really good:
camelJetty.setSslSocketConnectors -> Switched to SSLContextFactory .. is 
incompatible though
camelJetty.setSocketConnectors -> Did not find any good replacement
camelJetty.addSslSocketConnectorProperty -> A lot of the properties have 
changed names

2) SslSocketConnectorProperties:
Jetty 8:
                 jetty.addSslSocketConnectorProperty("keyPassword", pwd);
                 jetty.addSslSocketConnectorProperty("password", pwd);
                 jetty.addSslSocketConnectorProperty("keystore", path);
jetty.addSslSocketConnectorProperty("truststoreType", "JKS");
Jetty 9:
jetty.addSslSocketConnectorProperty("keyManagerPassword", pwd);
jetty.addSslSocketConnectorProperty("keyStorePassword", pwd);
                 jetty.addSslSocketConnectorProperty("keyStorePath", path);
jetty.addSslSocketConnectorProperty("trustStoreType", "JKS");

How do we handle these? I propose we change the name to 
addSslContextFactoryProperty to make it clear that it is not compatible.
We can then provide the old name addSslSocketConnectorProperty too and 
write a warning if it is used on jetty 9 while ignoring the data.

3) Charset and other headers are sometimes uppercase, sometimes not


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com