Schlagwort-Archive: ops4j

Bind certain Web-Applications to specific HttpConnectors

Starting with Pax-Web 2.1 it’s possible to bind web applications to a specific http-connector. For this to work you need to configure an additional http connector through jetty.xml. The jetty.xml for pax-web uses a slightly different way of configuring connectors. Instead of setting a new Connector the jetty.xml is interpreted after the Jetty Server has already been configured. Therefore you need to add a connector, not create a new one.

    <Call name="addConnector">
          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
            <Set name="host"><Property name="" /></Set>
            <Set name="port"><Property name="jetty.port" default="8282"/></Set>
            <Set name="maxIdleTime">300000</Set>
            <Set name="Acceptors">2</Set>
            <Set name="statsOn">false</Set>
            <Set name="confidentialPort">8443</Set>
            <Set name="name">jettyConn1</Set>
	    <Set name="lowResourcesConnections">20000</Set>
	    <Set name="lowResourcesMaxIdleTime">5000</Set>

Make sure you have a name configured for this connector. The sample uses jettyConn1 as name.