diff options
author | Joakim Erdfelt | 2013-06-03 18:33:27 +0000 |
---|---|---|
committer | Joakim Erdfelt | 2013-06-03 18:34:38 +0000 |
commit | 0c8a3b3f52609c4ff66beba60bda6b2298f4dc5d (patch) | |
tree | dab220722a8f0cf1bccbfa1622b413bfdcf1d77b /jetty-deploy/src/test/resources | |
parent | 670b6a964cf637e4de2045213ff3116bff245f77 (diff) | |
download | org.eclipse.jetty.project-0c8a3b3f52609c4ff66beba60bda6b2298f4dc5d.tar.gz org.eclipse.jetty.project-0c8a3b3f52609c4ff66beba60bda6b2298f4dc5d.tar.xz org.eclipse.jetty.project-0c8a3b3f52609c4ff66beba60bda6b2298f4dc5d.zip |
Updating Jetty XML use in jetty-deploy tests.
Diffstat (limited to 'jetty-deploy/src/test/resources')
-rw-r--r-- | jetty-deploy/src/test/resources/jetty-deploymgr-contexts.xml | 27 | ||||
-rw-r--r-- | jetty-deploy/src/test/resources/jetty-http.xml | 41 | ||||
-rw-r--r-- | jetty-deploy/src/test/resources/jetty.xml | 159 |
3 files changed, 144 insertions, 83 deletions
diff --git a/jetty-deploy/src/test/resources/jetty-deploymgr-contexts.xml b/jetty-deploy/src/test/resources/jetty-deploymgr-contexts.xml index 04cfa34ac6..8d55d22010 100644 --- a/jetty-deploy/src/test/resources/jetty-deploymgr-contexts.xml +++ b/jetty-deploy/src/test/resources/jetty-deploymgr-contexts.xml @@ -8,14 +8,19 @@ <Set name="contexts"> <Ref refid="Contexts" /> </Set> - - <!-- Providers of Apps --> - <Set name="appProviders"> - <Array type="org.eclipse.jetty.deploy.AppProvider"> - <Item> - <New class="org.eclipse.jetty.deploy.providers.WebAppProvider"> - <Set name="monitoredDirName"><SystemProperty name="jetty.home" />/webapps</Set> + + <Call name="setContextAttribute"> + <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg> + <Arg>.*/servlet-api-[^/]*\.jar$</Arg> + </Call> + + <Call id="webappprovider" name="addAppProvider"> + <Arg> + <New class="org.eclipse.jetty.deploy.providers.WebAppProvider"> + <Set name="monitoredDirName"><Property name="jetty.home" default="." />/webapps</Set> + <Set name="defaultsDescriptor"><Property name="jetty.home" default="." />/etc/webdefault.xml</Set> <Set name="scanInterval">1</Set> + <Set name="extractWars">true</Set> <Set name="configurationManager"> <New class="org.eclipse.jetty.deploy.PropertiesConfigurationManager"> <Set name="file"> @@ -23,10 +28,10 @@ </Set> </New> </Set> - </New> - </Item> - </Array> - </Set> + </New> + </Arg> + </Call> + </New> </Arg> </Call> diff --git a/jetty-deploy/src/test/resources/jetty-http.xml b/jetty-deploy/src/test/resources/jetty-http.xml new file mode 100644 index 0000000000..42b889b383 --- /dev/null +++ b/jetty-deploy/src/test/resources/jetty-http.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> + +<!-- ============================================================= --> +<!-- Configure the Jetty Server instance with an ID "Server" --> +<!-- by adding a HTTP connector. --> +<!-- This configuration must be used in conjunction with jetty.xml --> +<!-- ============================================================= --> +<Configure id="Server" class="org.eclipse.jetty.server.Server"> + + <!-- =========================================================== --> + <!-- Add a HTTP Connector. --> + <!-- Configure an o.e.j.server.ServerConnector with a single --> + <!-- HttpConnectionFactory instance using the common httpConfig --> + <!-- instance defined in jetty.xml --> + <!-- --> + <!-- Consult the javadoc of o.e.j.server.ServerConnector and --> + <!-- o.e.j.server.HttpConnectionFactory for all configuration --> + <!-- that may be set here. --> + <!-- =========================================================== --> + <Call name="addConnector"> + <Arg> + <New class="org.eclipse.jetty.server.ServerConnector"> + <Arg name="server"><Ref refid="Server" /></Arg> + <Arg name="factories"> + <Array type="org.eclipse.jetty.server.ConnectionFactory"> + <Item> + <New class="org.eclipse.jetty.server.HttpConnectionFactory"> + <Arg name="config"><Ref refid="httpConfig" /></Arg> + </New> + </Item> + </Array> + </Arg> + <Set name="host"></Set> + <Set name="port">0</Set> + <Set name="idleTimeout">300000</Set> + </New> + </Arg> + </Call> + +</Configure> diff --git a/jetty-deploy/src/test/resources/jetty.xml b/jetty-deploy/src/test/resources/jetty.xml index 732adfb3f7..25332f6125 100644 --- a/jetty-deploy/src/test/resources/jetty.xml +++ b/jetty-deploy/src/test/resources/jetty.xml @@ -2,54 +2,108 @@ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> <!-- =============================================================== --> -<!-- Configure the Jetty Server --> -<!-- --> <!-- Documentation of this file format can be found at: --> -<!-- http://docs.codehaus.org/display/JETTY/jetty.xml --> +<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax --> +<!-- --> +<!-- Additional configuration files are available in $JETTY_HOME/etc --> +<!-- and can be mixed in. See start.ini file for the default --> +<!-- configuration files. --> <!-- --> +<!-- For a description of the configuration mechanism, see the --> +<!-- output of: --> +<!-- java -jar start.jar -? --> <!-- =============================================================== --> - +<!-- =============================================================== --> +<!-- Configure a Jetty Server instance with an ID "Server" --> +<!-- Other configuration files may also configure the "Server" --> +<!-- ID, in which case they are adding configuration to the same --> +<!-- instance. If other configuration have a different ID, they --> +<!-- will create and configure another instance of Jetty. --> +<!-- Consult the javadoc of o.e.j.server.Server for all --> +<!-- configuration that may be set here. --> +<!-- =============================================================== --> <Configure id="Server" class="org.eclipse.jetty.server.Server"> + <!-- =========================================================== --> - <!-- Server Thread Pool --> + <!-- Configure the Server Thread Pool. --> + <!-- The server holds a common thread pool which is used by --> + <!-- default as the executor used by all connectors and servlet --> + <!-- dispatches. --> + <!-- --> + <!-- Configuring a fixed thread pool is vital to controlling the --> + <!-- maximal memory footprint of the server and is a key tuning --> + <!-- parameter for tuning. In an application that rarely blocks --> + <!-- then maximal threads may be close to the number of 5*CPUs. --> + <!-- In an application that frequently blocks, then maximal --> + <!-- threads should be set as high as possible given the memory --> + <!-- available. --> + <!-- --> + <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool --> + <!-- for all configuration that may be set here. --> <!-- =========================================================== --> + <!-- uncomment to change type of threadpool + <Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg> + --> <Get name="ThreadPool"> - <Set name="minThreads" type="int">10</Set> - <Set name="maxThreads" type="int">200</Set> + <Set name="minThreads" type="int"><Property name="threads.min" default="10"/></Set> + <Set name="maxThreads" type="int"><Property name="threads.max" default="200"/></Set> + <Set name="idleTimeout" type="int"><Property name="threads.timeout" default="60000"/></Set> + <Set name="detailedDump">false</Set> </Get> <!-- =========================================================== --> - <!-- Set connectors --> + <!-- Add shared Scheduler instance --> <!-- =========================================================== --> - - <Call name="addConnector"> + <Call name="addBean"> <Arg> - <New class="org.eclipse.jetty.server.ServerConnector"> - <Arg><Ref refid="Server" /></Arg> - <Set name="host"></Set> - <Set name="port">0</Set> - <Set name="idleTimeout">300000</Set> - </New> + <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/> </Arg> </Call> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <!-- To add a HTTPS SSL connector --> - <!-- mixin jetty-ssl.xml: --> - <!-- java -jar start.jar etc/jetty-ssl.xml --> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- =========================================================== --> + <!-- Http Configuration. --> + <!-- This is a common configuration instance used by all --> + <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)--> + <!-- It configures the non wire protocol aspects of the HTTP --> + <!-- semantic. --> + <!-- --> + <!-- This configuration is only defined here and is used by --> + <!-- reference from the jetty-http.xml, jetty-https.xml and --> + <!-- jetty-spdy.xml configuration files which instantiate the --> + <!-- connectors. --> + <!-- --> + <!-- Consult the javadoc of o.e.j.server.HttpConfiguration --> + <!-- for all configuration that may be set here. --> + <!-- =========================================================== --> + <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> + <Set name="secureScheme">https</Set> + <Set name="securePort" type="java.lang.Integer"><Property name="jetty.secure.port" default="8443" /></Set> + <Set name="outputBufferSize">32768</Set> + <Set name="requestHeaderSize">8192</Set> + <Set name="responseHeaderSize">8192</Set> + <Set name="sendServerVersion">true</Set> + <Set name="sendDateHeader">false</Set> + <Set name="headerCacheSize">512</Set> + + <!-- Uncomment to enable handling of X-Forwarded- style headers + <Call name="addCustomizer"> + <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg> + </Call> + --> + </New> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - <!-- To allow Jetty to be started from xinetd --> - <!-- mixin jetty-xinetd.xml: --> - <!-- java -jar start.jar etc/jetty-xinetd.xml --> - <!-- --> - <!-- See jetty-xinetd.xml for further instructions. --> - <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- =========================================================== --> - <!-- Set handler Collection Structure --> + <!-- Set the default handler structure for the Server --> + <!-- A handler collection is used to pass received requests to --> + <!-- both the ContextHandlerCollection, which selects the next --> + <!-- handler by context path and virtual host, and the --> + <!-- DefaultHandler, which handles any requests not handled by --> + <!-- the context handlers. --> + <!-- Other handlers may be added to the "Handlers" collection, --> + <!-- for example the jetty-requestlog.xml file adds the --> + <!-- RequestLogHandler after the default handler --> <!-- =========================================================== --> <Set name="handler"> <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> @@ -61,56 +115,17 @@ <Item> <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/> </Item> - <Item> - <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/> - </Item> </Array> </Set> </New> </Set> <!-- =========================================================== --> - <!-- Configure Authentication Login Service --> - <!-- Realms may be configured for the entire server here, or --> - <!-- they can be configured for a specific web app in a context --> - <!-- configuration (see $(jetty.home)/contexts/test.xml for an --> - <!-- example). --> - <!-- =========================================================== --> - <Call name="addBean"> - <Arg> - <New class="org.eclipse.jetty.security.HashLoginService"> - <Set name="name">Test Realm</Set> - <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> - <Set name="refreshInterval">0</Set> - </New> - </Arg> - </Call> - - <!-- =========================================================== --> - <!-- Configure Request Log --> - <!-- Request logs may be configured for the entire server here, --> - <!-- or they can be configured for a specific web app in a --> - <!-- contexts configuration (see $(jetty.home)/contexts/test.xml --> - <!-- for an example). --> - <!-- =========================================================== --> - <Ref refid="RequestLog"> - <Set name="requestLog"> - <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog"> - <Set name="filename"><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Set> - <Set name="filenameDateFormat">yyyy_MM_dd</Set> - <Set name="retainDays">90</Set> - <Set name="append">true</Set> - <Set name="extended">false</Set> - <Set name="logCookies">false</Set> - <Set name="LogTimeZone">GMT</Set> - </New> - </Set> - </Ref> - - <!-- =========================================================== --> - <!-- extra options --> + <!-- extra server options --> <!-- =========================================================== --> <Set name="stopAtShutdown">true</Set> - <Set name="stopTimeout">1000</Set> + <Set name="stopTimeout">5000</Set> + <Set name="dumpAfterStart"><Property name="jetty.dump.start" default="false"/></Set> + <Set name="dumpBeforeStop"><Property name="jetty.dump.stop" default="false"/></Set> </Configure> |