Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

jetty.xml

00001 <?xml version="1.0"?> 
00002 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
00003 
00004 <!-- =============================================================== -->
00005 <!-- Configure the Jetty Server                                     -->
00006 <!-- =============================================================== -->
00007 <Configure class="org.mortbay.jetty.plus.Server">
00008 
00009   <!-- =============================================================== -->
00010   <!-- Configure the Request Listeners                                 -->
00011   <!-- =============================================================== -->
00012 
00013   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00014   <!-- Add and configure a HTTP listener to port 8082                  -->
00015   <!-- The default port can be changed using: java -Djetty.port=80     -->
00016   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00017   <!-- bjc: Add 5 listeners for each of the  proxy forwarding statements-->
00018   <!-- in apache httpd.conf.                                           -->
00019   <Call name="addListener">
00020     <Arg>
00021       <New class="org.mortbay.http.SocketListener">
00022         <Set name="Port"><SystemProperty name="jetty.port" default="8081"/></Set>
00023         <Set name="MinThreads">10</Set>
00024         <Set name="MaxThreads">100</Set>
00025         <Set name="MaxIdleTimeMs">30000</Set>
00026         <Set name="LowResourcePersistTimeMs">5000</Set>
00027       </New>
00028     </Arg>
00029   </Call>
00030 
00031   <Call name="addListener">
00032     <Arg>
00033       <New class="org.mortbay.http.SocketListener">
00034         <Set name="Port"><SystemProperty name="jetty.port" default="8082"/></Set>
00035         <Set name="MinThreads">10</Set>
00036         <Set name="MaxThreads">100</Set>
00037         <Set name="MaxIdleTimeMs">30000</Set>
00038         <Set name="LowResourcePersistTimeMs">5000</Set>
00039       </New>
00040     </Arg>
00041   </Call>
00042 
00043   <Call name="addListener">
00044     <Arg>
00045       <New class="org.mortbay.http.SocketListener">
00046         <Set name="Port"><SystemProperty name="jetty.port" default="8083"/></Set>
00047         <Set name="MinThreads">10</Set>
00048         <Set name="MaxThreads">100</Set>
00049         <Set name="MaxIdleTimeMs">30000</Set>
00050         <Set name="LowResourcePersistTimeMs">5000</Set>
00051       </New>
00052     </Arg>
00053   </Call>
00054 
00055   <Call name="addListener">
00056     <Arg>
00057       <New class="org.mortbay.http.SocketListener">
00058         <Set name="Port"><SystemProperty name="jetty.port" default="8084"/></Set>
00059         <Set name="MinThreads">10</Set>
00060         <Set name="MaxThreads">100</Set>
00061         <Set name="MaxIdleTimeMs">30000</Set>
00062         <Set name="LowResourcePersistTimeMs">5000</Set>
00063       </New>
00064     </Arg>
00065   </Call>
00066 
00067   <Call name="addListener">
00068     <Arg>
00069       <New class="org.mortbay.http.SocketListener">
00070         <Set name="Port"><SystemProperty name="jetty.port" default="8085"/></Set>
00071         <Set name="MinThreads">10</Set>
00072         <Set name="MaxThreads">100</Set>
00073         <Set name="MaxIdleTimeMs">30000</Set>
00074         <Set name="LowResourcePersistTimeMs">5000</Set>
00075       </New>
00076     </Arg>
00077   </Call>
00078 
00079   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00080   <!-- bjc: Add support for connection pooling and ACID transactions   -->
00081   <!--  Experimental but quite promising at this point.                      -->
00082   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00083   <resource-env-ref>
00084     <description>DB Connection</description>
00085     <resource-env-ref-name>jdbc/myDB</resource-env-ref-name>
00086     <resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
00087   </resource-env-ref>
00088 
00089   <Call name="addService">
00090     <Arg>
00091       <New class="org.mortbay.jetty.plus.JotmService">
00092         <Set name="Name">TransactionMgr</Set>
00093 
00094         <!-- set up a DataSource where the driver does the pooling                 -->
00095         <Call name="addDataSource">
00096            <Arg>jdbc/mysqlDB</Arg>    <!-- client lookup jndi name of datasource  -->
00097            <Arg>
00098              <New class="org.enhydra.jdbc.standard.StandardXADataSource">
00099                <Set name="DriverName">com.mysql.jdbc.Driver</Set>
00100                <Set name="Url">jdbc:mysql://localhost:3306/jwaa</Set>
00101                <Set name="User">jwaa</Set>
00102                <Set name="Password">jwaa.password</Set>
00103              </New>
00104            </Arg>
00105         </Call>
00106        </New>
00107     </Arg>
00108   </Call>
00109 
00110   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00111   <!-- Add a HTTPS SSL listener on port 8443                           -->
00112   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00113   <!-- UNCOMMENT TO ACTIVATE
00114   <Call name="addListener">
00115     <Arg>
00116       <New class="org.mortbay.http.SunJsseListener">
00117         <Set name="Port">8443</Set>
00118         <Set name="MinThreads">5</Set>
00119         <Set name="MaxThreads">100</Set>
00120         <Set name="MaxIdleTimeMs">30000</Set>
00121         <Set name="LowResourcePersistTimeMs">2000</Set>
00122         <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/etc/demokeystore</Set>
00123   <Set name="Password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
00124   <Set name="KeyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
00125         <Set name="NonPersistentUserAgent">MSIE 5</Set>
00126       </New>
00127     </Arg>
00128   </Call>
00129   -->
00130 
00131   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00132   <!-- Add a AJP13 listener on port 8009                               -->
00133   <!-- This protocol can be used with mod_jk in apache, IIS etc.       -->
00134   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00135 <!-- bjc
00136   <Call name="addListener">
00137     <Arg>
00138       <New class="org.mortbay.http.ajp.AJP13Listener">
00139         <Set name="Port">8009</Set>
00140         <Set name="MinThreads">5</Set>
00141         <Set name="MaxThreads">20</Set>
00142         <Set name="MaxIdleTimeMs">0</Set>
00143         <Set name="confidentialPort">443</Set>
00144       </New>
00145     </Arg>
00146   </Call>
00147 -->
00148 
00149   <!-- =============================================================== -->
00150   <!-- Configure the Contexts                                         -->
00151   <!-- =============================================================== -->
00152 
00153 
00154   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00155   <!-- Add a all web application within the webapps directory.         -->
00156   <!-- + No virtual host specified                                     -->
00157   <!-- + Look in the webapps directory relative to jetty.home or .     -->
00158   <!-- + Use the webdefault.xml resource for the defaults descriptor   -->
00159   <!-- + Upack the war file                                           -->
00160   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00161   <Set name="rootWebApp">root</Set>
00162   <Call name="addWebApplications">
00163     <Arg></Arg>
00164     <Arg><SystemProperty name="jetty.home" default="."/>/webapps/</Arg>
00165     <Arg>org/mortbay/jetty/servlet/webdefault.xml</Arg>
00166     <Arg type="boolean">true</Arg>
00167   </Call>
00168 
00169 
00170   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00171   <!-- Add and configure a specific web application                   -->
00172   <!-- + Set Unpack WAR files                                         -->
00173   <!-- + Set Default Descriptor.  Resource, file or URL               -->
00174   <!-- + Set Virtual Hosts. A Null host or empty array means all hosts -->
00175   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
00176   <!-- UNCOMMENT TO ACTIVATE
00177   <Call name="addWebApplication">
00178     <Arg>/context</Arg>
00179     <Arg>./webapps/root</Arg>
00180 
00181     <Set name="extractWAR">false</Set> 
00182 
00183     <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>
00184 
00185     <Set name="virtualHosts">
00186       <Array type="java.lang.String">
00187         <Item></Item>
00188         <Item>127.0.0.1</Item>
00189         <Item>localhost</Item>
00190         <Item>www.acme.com</Item>
00191       </Array>
00192     </Set>
00193   </Call>
00194   -->
00195 
00196   <!-- =============================================================== -->
00197   <!-- Configure the Request Log                                       -->
00198   <!-- =============================================================== -->
00199   <Set name="RequestLog">
00200     <New class="org.mortbay.http.NCSARequestLog">
00201       <Arg><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Arg>
00202       <Set name="retainDays">90</Set>
00203       <Set name="append">true</Set>
00204       <Set name="extended">false</Set>
00205       <Set name="buffered">false</Set>
00206       <Set name="LogTimeZone">EST</Set>
00207     </New>
00208   </Set>
00209 
00210   <!-- =============================================================== -->
00211   <!-- Configure the Other Server Options                             -->
00212   <!-- =============================================================== -->
00213   <Set name="requestsPerGC">2000</Set>
00214   <Set name="statsOn">true</Set>
00215 
00216 </Configure>
00217 
00218 
00219 
00220 
00221 
00222 
00223 
00224 
00225