Jetty ConfigurationPage edited by Colm O hEigeartaighChanges (1)
Full ContentConfiguring the Jetty RuntimeOverviewThis section is for configuring the Jetty runtime used for the CXF standalone model. The Jetty runtime is used by HTTP servers and HTTP clients using a decoupled endpoint. The Jetty runtime's thread pool, connector and handlers can be configured. You can also set a number of the security settings for an HTTP service provider through the Jetty runtime. NamespaceThe elements used to configure the Jetty runtime are defined in the namespace http://cxf.apache.org/transports/http-jetty/configuration. It is commonly referred to using the prefix httpj. In order to use the Jetty configuration elements you will need to add the lines shown below to the beans element of your endpoint's configuration file. In addition, you will need to add the configuration elements' namespace to the xsi:schemaLocation attribute.
<beans ...
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration
...
xsi:schemaLocation="...
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
...>
ExampleThe example below shows a configuration fragment that configures a Jetty instance on port number 9001.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xsi:schemaLocation="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
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
...
<httpj:engine-factory bus="cxf">
<httpj:identifiedTLSServerParameters id="secure">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="password">
<sec:keyStore type="JKS" password="password"
file="certs/cherry.jks"/>
</sec:keyManagers>
</httpj:tlsServerParameters>
</httpj:identifiedTLSServerParameters>
<httpj:engine port="9001">
<httpj:tlsServerParametersRef id="secure" />
<httpj:threadingParameters minThreads="5"
maxThreads="15" />
<httpj:connector>
<beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">
<beans:property name = "port" value="9001" />
</beans:bean>
</httpj:connector>
<httpj:handlers>
<beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>
</httpj:handlers>
<httpj:sessionSupport>true</httpj:sessionSupport>
</httpj:engine>
</httpj:engine-factory>
</beans>
Stop watching space
|
Change email notification preferences
View Online
|
View Changes
|
Add Comment
|
[CONF] Apache CXF Documentation > Jetty Configuration
Colm O hEigeartaigh (Confluence) Mon, 12 Aug 2013 08:21:21 -0700
- [CONF] Apache CXF Documentation > Jett... Colm O hEigeartaigh (Confluence)
- [CONF] Apache CXF Documentation >... Colm O hEigeartaigh (Confluence)
- [CONF] Apache CXF Documentation >... Colm O hEigeartaigh (Confluence)
