|
Page Edited :
CXF20DOC :
Jetty Configuration
Jetty Configuration has been edited by willem jiang (Aug 05, 2007). Change summary: Added the connector , handlers and sessionSupport subelements to the httpj:engine Configuring the Jetty RuntimeOverviewThe 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 <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
...>
The httpj:engine-factory element has three children that contain the information used to configure the HTTP ports instantiated by the Jetty runtime factory. The children are described below.
The engine elementThe httpj:engine element is used to configure specific instances of the Jetty runtime. It has a single attribute, port, that specifies the number of the port being managed by the Jetty instance.
Each httpj:engine element can have two children: one for configuring security properties and one for configuring the Jetty instance's thread pool. For each type of configuration you can either directly provide the configuration information or provide a reference to a set of configuration properties defined in the parent httpj:engine-factory element. The child elements used to provide the configuration properties are described below.
Configuring the thread poolYou can configure the size of a Jetty instance's thread pool by either:
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"> <sec:keyManagers keyPassword="password"> <sec:keyStore type="JKS" password="password" file="certs/cherry.jks"/> </sec:keyManagers> </httpj:identifiedTLSServerParameters> <httpj:engine port="9001"> <httpj:tlsServerParametersRef id="secure" /> <httpj:threadingParameters minThreads="5" maxThreads="15" /> <httpj:connector> <beans:bean class="org.mortbay.jetty.bio.SocketConnector"> <beans:property name = "port" value="9001" /> </beans:bean> </httpj:connector> <httpj:handlers> <beans:bean class="org.mortbay.jetty.handler.DefaultHandler"/> </httpj:handlers> <httpj:sessionSupport>true</hj:sessionSupport> </httpj:engine> </httpj:engine-factory> </beans> |
Unsubscribe or edit your notifications preferences
