Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
  3.  
  4. <!-- =============================================================== -->
  5. <!-- Documentation of this file format can be found at: -->
  6. <!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
  7. <!-- -->
  8. <!-- Additional configuration files are available in $JETTY_HOME/etc -->
  9. <!-- and can be mixed in. See start.ini file for the default -->
  10. <!-- configuration files. -->
  11. <!-- -->
  12. <!-- For a description of the configuration mechanism, see the -->
  13. <!-- output of: -->
  14. <!-- java -jar start.jar -? -->
  15. <!-- =============================================================== -->
  16.  
  17. <!-- =============================================================== -->
  18. <!-- Configure a Jetty Server instance with an ID "Server" -->
  19. <!-- Other configuration files may also configure the "Server" -->
  20. <!-- ID, in which case they are adding configuration to the same -->
  21. <!-- instance. If other configuration have a different ID, they -->
  22. <!-- will create and configure another instance of Jetty. -->
  23. <!-- Consult the javadoc of o.e.j.server.Server for all -->
  24. <!-- configuration that may be set here. -->
  25. <!-- =============================================================== -->
  26. <Configure id="Server" class="org.eclipse.jetty.server.Server">
  27.  
  28. <!-- =========================================================== -->
  29. <!-- Configure the Server Thread Pool. -->
  30. <!-- The server holds a common thread pool which is used by -->
  31. <!-- default as the executor used by all connectors and servlet -->
  32. <!-- dispatches. -->
  33. <!-- -->
  34. <!-- Configuring a fixed thread pool is vital to controlling the -->
  35. <!-- maximal memory footprint of the server and is a key tuning -->
  36. <!-- parameter for tuning. In an application that rarely blocks -->
  37. <!-- then maximal threads may be close to the number of 5*CPUs. -->
  38. <!-- In an application that frequently blocks, then maximal -->
  39. <!-- threads should be set as high as possible given the memory -->
  40. <!-- available. -->
  41. <!-- -->
  42. <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool -->
  43. <!-- for all configuration that may be set here. -->
  44. <!-- =========================================================== -->
  45. <!-- uncomment to change type of threadpool
  46. <Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg>
  47. -->
  48. <Get name="ThreadPool">
  49. <Set name="minThreads" type="int"><Property name="threads.min" default="10"/></Set>
  50. <Set name="maxThreads" type="int"><Property name="threads.max" default="200"/></Set>
  51. <Set name="idleTimeout" type="int"><Property name="threads.timeout" default="60000"/></Set>
  52. <Set name="detailedDump">false</Set>
  53. </Get>
  54.  
  55. <!-- =========================================================== -->
  56. <!-- Add shared Scheduler instance -->
  57. <!-- =========================================================== -->
  58. <Call name="addBean">
  59. <Arg>
  60. <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
  61. </Arg>
  62. </Call>
  63.  
  64. <!-- =========================================================== -->
  65. <!-- Http Configuration. -->
  66. <!-- This is a common configuration instance used by all -->
  67. <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)-->
  68. <!-- It configures the non wire protocol aspects of the HTTP -->
  69. <!-- semantic. -->
  70. <!-- -->
  71. <!-- This configuration is only defined here and is used by -->
  72. <!-- reference from the jetty-http.xml, jetty-https.xml and -->
  73. <!-- jetty-spdy.xml configuration files which instantiate the -->
  74. <!-- connectors. -->
  75. <!-- -->
  76. <!-- Consult the javadoc of o.e.j.server.HttpConfiguration -->
  77. <!-- for all configuration that may be set here. -->
  78. <!-- =========================================================== -->
  79. <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
  80. <Set name="secureScheme">https</Set>
  81. <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
  82. <Set name="outputBufferSize"><Property name="jetty.output.buffer.size" default="32768" /></Set>
  83. <Set name="outputAggregationSize"><Property name="jetty.output.aggregation.size" default="8192" /></Set>
  84. <Set name="requestHeaderSize"><Property name="jetty.request.header.size" default="8192" /></Set>
  85. <Set name="responseHeaderSize"><Property name="jetty.response.header.size" default="8192" /></Set>
  86. <Set name="sendServerVersion"><Property name="jetty.send.server.version" default="true" /></Set>
  87. <Set name="sendDateHeader"><Property name="jetty.send.date.header" default="false" /></Set>
  88. <Set name="headerCacheSize">512</Set>
  89. <Set name="delayDispatchUntilContent"><Property name="jetty.delayDispatchUntilContent" default="false"/></Set>
  90. <!-- Uncomment to enable handling of X-Forwarded- style headers
  91. <Call name="addCustomizer">
  92. <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
  93. </Call>
  94. -->
  95. </New>
  96.  
  97.  
  98. <!-- =========================================================== -->
  99. <!-- Set the default handler structure for the Server -->
  100. <!-- A handler collection is used to pass received requests to -->
  101. <!-- both the ContextHandlerCollection, which selects the next -->
  102. <!-- handler by context path and virtual host, and the -->
  103. <!-- DefaultHandler, which handles any requests not handled by -->
  104. <!-- the context handlers. -->
  105. <!-- Other handlers may be added to the "Handlers" collection, -->
  106. <!-- for example the jetty-requestlog.xml file adds the -->
  107. <!-- RequestLogHandler after the default handler -->
  108. <!-- =========================================================== -->
  109. <Set name="handler">
  110. <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
  111. <Set name="handlers">
  112. <Array type="org.eclipse.jetty.server.Handler">
  113. <Item>
  114. <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
  115. </Item>
  116. <Item>
  117. <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
  118. </Item>
  119. </Array>
  120. </Set>
  121. </New>
  122. </Set>
  123.  
  124. <!-- =========================================================== -->
  125. <!-- extra server options -->
  126. <!-- =========================================================== -->
  127. <Set name="stopAtShutdown">true</Set>
  128. <Set name="stopTimeout">5000</Set>
  129. <Set name="dumpAfterStart"><Property name="jetty.dump.start" default="false"/></Set>
  130. <Set name="dumpBeforeStop"><Property name="jetty.dump.stop" default="false"/></Set>
  131.  
  132. <!-- =========================================================== -->
  133. <!-- configure session id manager -->
  134. <!-- =========================================================== -->
  135. <Set name="sessionIdManager">
  136. <New id="jdbcidmgr" class="org.eclipse.jetty.server.session.JDBCSessionIdManager">
  137. <Arg>
  138. <Ref id="Server"/>
  139. </Arg>
  140. <Set name="workerName">dmclocal</Set>
  141. <Call name="setDriverInfo">
  142. <Arg>org.postgresql.Driver</Arg>
  143. <Arg>jdbc:postgresql://localhost:5432/dmc_sessions?user=dmc_sessions&amp;password=dmc_sessions</Arg>
  144. </Call>
  145. <Set name="scavengeInterval">60</Set>
  146. </New>
  147. </Set>
  148. <Call name="setAttribute">
  149. <Arg>jdbcIdMgr</Arg>
  150. <Arg>
  151. <Ref id="jdbcidmgr"/>
  152. </Arg>
  153. </Call>
  154.  
  155. </Configure>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement