Dict.CN 在線詞典, 英語(yǔ)學(xué)習(xí), 在線翻譯

          都市淘沙者

          荔枝FM Everyone can be host

          統(tǒng)計(jì)

          留言簿(23)

          積分與排名

          優(yōu)秀學(xué)習(xí)網(wǎng)站

          友情連接

          閱讀排行榜

          評(píng)論排行榜

          Resin 3.1 配置文件詳細(xì)說(shuō)明

          <!--  Resin 3.1 配置文件. -->  
          <resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core">  
            <!-- 加載resin/lib下的所有.jar文件-->  
            <class-loader>  
              <tree-loader path="${resin.home}/lib"/>  
              <tree-loader path="${resin.root}/lib"/>  
            </class-loader>  
            <!--  管理配置 -->  
            <management path="${resin.root}/admin">  
            </management>  
            <!--   JDK日志接口的配置.   -->  
            <log name="" path="stdout:" timestamp="[%H:%M:%S.%s] "/>  
            <!-- 日志信息的級(jí)別:'info' 生產(chǎn)環(huán)境  'fine' 開(kāi)發(fā)環(huán)境 'finer' 調(diào)試環(huán)境 -->  
            <logger name="com.caucho" level="info"/>  
            <logger name="com.caucho.java" level="config"/>  
            <logger name="com.caucho.loader" level="config"/>  
            <!--  環(huán)境上下文的檢測(cè)時(shí)間,對(duì)于生產(chǎn)站點(diǎn), 這個(gè)要設(shè)置長(zhǎng)一點(diǎn),例如600秒,10分鐘  -->  
            <dependency-check-interval>2s</dependency-check-interval>  
            <!--      發(fā)送郵件通知的SMTP服務(wù)器     -->  
            <system-property mail.smtp.host="127.0.0.1"/>  
            <system-property mail.smtp.port="25"/>  
            <!--      你可以把編譯器改成 "javac", "eclipse" 或者 "internal".    -->  
            <javac compiler="internal" args="-source 1.5"/>  
            
            <!-- Security providers. -->  
                <security-provider>  
                   com.sun.net.ssl.internal.ssl.Provider  
                </security-provider>  
            
            <!-- 去掉注釋,如果你使用resin提供的xml應(yīng)用 -->  
                  
                <system-property javax.xml.parsers.DocumentBuilderFactory  
                                ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>  
                <system-property javax.xml.parsers.SAXParserFactory  
                                ="com.caucho.xml.parsers.XmlSAXParserFactory"/>  
              
            <cluster id="app-tier">  
              <!-- 設(shè)置集群上下文的根, 相對(duì)于server.root -->  
              <root-directory>.</root-directory>  
              <server-default>  
                <!-- HTTP服務(wù)的端口-->  
                <http address="*" port="8080"/>  
                <!-- SSL端口配置: -->  
                      
                    <http address="*" port="8443">  
                      <openssl>  
                        <certificate-file>keys/gryffindor.crt</certificate-file>  
                        <certificate-key-file>keys/gryffindor.key</certificate-key-file>  
                        <password>test123</password>  
                      </openssl>  
                    </http>  
                   
                <!--          JVM參數(shù)設(shè)置        -->  
                <jvm-arg>-Xmx256m</jvm-arg>  
                <jvm-arg>-Xss1m</jvm-arg>  
                <jvm-arg>-Xdebug</jvm-arg>  
                <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>  
                <!-- Uncomment to enable admin heap dumps 去掉這個(gè)如果你想管理內(nèi)存堆的傾倒 -->  
                    <jvm-arg>-agentlib:resin</jvm-arg>  
            
                <watchdog-arg>-Dcom.sun.management.jmxremote</watchdog-arg>  
                <!--   強(qiáng)制resin強(qiáng)制重起時(shí)的最小空閑內(nèi)存    -->  
                <memory-free-min>1M</memory-free-min>  
                <!-- 最大線程數(shù)量. -->  
                <thread-max>256</thread-max>  
                <!--  套接字等待時(shí)間 -->  
                <socket-timeout>65s</socket-timeout>  
                <!-- 配置 keepalive -->  
                <keepalive-max>128</keepalive-max>  
                <keepalive-timeout>15s</keepalive-timeout>  
                <!--          如果使用的是UNIX,這里是啟動(dòng)的帳號(hào)和用戶組. -->  
                    <user-name>resin</user-name>  
                    <group-name>resin</group-name>  
                  
              </server-default>  
              <!-- 定義群集服務(wù)器 -->  
              <server id="" address="127.0.0.1" port="6800"/>  
              <!--    Configures the persistent store for single-server or clustered
          配置獨(dú)立服務(wù)器或者群集的持久化存儲(chǔ),專業(yè)版的功能    -->  
              <resin:if test="${resin.isProfessional()}">  
                <persistent-store type="cluster">  
                  <init path="session"/>  
                </persistent-store>  
              </resin:if>  
              <!--   為了安全, 你可以為SSL會(huì)話(SSL sessions)定義一個(gè)不同的cookie. -->  
                  <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>  
                
              <!--  緩存啟用 (專業(yè)版的功能)   -->  
              <resin:if test="${isResinProfessional}">  
                <cache path="cache" memory-size="64M">  
                  <!-- Vary header rewriting for IE -->  
                  <rewrite-vary-as-private/>  
                </cache>  
              </resin:if>  
              <!-- 啟用周期性的服務(wù)器狀態(tài)檢查和死鎖檢查,所有的服務(wù)器可以添加 <url> 來(lái)檢查。  -->  
              <resin:if test="${isResinProfessional}">  
                <ping>  
                  <!-- <url>http://localhost:8080/test-ping.jsp</url> -->  
                </ping>  
              </resin:if>  
              <!-- 包含web應(yīng)用的默認(rèn)行為  -->  
              <resin:import path="${resin.home}/conf/app-default.xml"/>  
              <!-- 每一個(gè)web應(yīng)用的默認(rèn)參數(shù)  -->  
              <web-app-default>  
                <!-- 擴(kuò)展庫(kù)的公共jar文件,擴(kuò)展是安全的即使沒(méi)有類裝載器知道的jars,
          裝載的類將為每個(gè)應(yīng)用分別裝載,也就是這些類都是不同的 -->  
                <class-loader>  
                  <tree-loader path="${server.root}/ext-webapp"/>  
                </class-loader>  
                <!--  設(shè)置緩存頁(yè)、靜態(tài)也的延時(shí)值  -->  
                <cache-mapping url-pattern="/" expires="5s"/>  
                <cache-mapping url-pattern="*.gif" expires="60s"/>  
                <cache-mapping url-pattern="*.jpg" expires="60s"/>  
                <cache-mapping url-pattern="*.png" expires="60s"/>  
                <!-- 啟用EL表達(dá)式 -->  
                <allow-servlet-el/>  
                <!--   安全原因, 默認(rèn)禁用了會(huì)話的URLs -->  
                <session-config>  
                  <enable-url-rewriting>false</enable-url-rewriting>  
                </session-config>  
                <!-- 安全原因, 在cookies中設(shè)置HttpOnly標(biāo)志 -->  
                    <cookie-http-only/>  
                      
                <!--一些JSP包有不正確的 .tld文件。可以把validate-taglib-schema設(shè)置成false,可能繼續(xù)正常工作
          Some JSP packages have incorrect .tld files.  It's possible to set validate-taglib-schema to false to work around these packages. -->  
                  <jsp>  
                    <validate-taglib-schema>true</validate-taglib-schema>  
                    <fast-jstl>true</fast-jstl>  
                    <fast-jsf>true</fast-jsf>  
                  </jsp>  
              </web-app-default>  
              <!-- 簡(jiǎn)單的數(shù)據(jù)池配置 -->  
                  The JDBC name is java:comp/env/jdbc/test  
                   <database>  
                     <jndi-name>jdbc/mysql</jndi-name>  
                     <driver type="org.gjt.mm.mysql.Driver">  
                       <url>jdbc:mysql://localhost:3306/test</url>  
                       <user></user>  
                       <password></password>  
                      </driver>  
                      <prepared-statement-cache-size>8</prepared-statement-cache-size>  
                      <max-connections>20</max-connections>  
                      <max-idle-time>30s</max-idle-time>  
                    </database>  
                      
              <!-- 定義所有虛擬主機(jī)的默認(rèn)配置 -->  
              <host-default>  
                <!-- 如果和別的web服務(wù)器整合,這個(gè)可以被去掉,因?yàn)閣eb服務(wù)器也可以記錄這些信息。  -->  
                <access-log path="logs/access.log" format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W"/>  
                <!-- war 文件的布置目錄  -->  
                <web-app-deploy path="webapps"/>  
                <!-- ear文件的布置目錄 -->  
                <ear-deploy path="deploy">  
                  <ear-default>  
                    <ejb-server>  
                      <config-directory>WEB-INF</config-directory>  
                      <data-source>jdbc/test</data-source>  
                    </ejb-server>  
                  </ear-default>  
                </ear-deploy>  
                <!-- rar文件的布置目錄 -->  
                <resource-deploy path="deploy"/>  
              </host-default>  
              <!-- 虛擬主機(jī)的布置目錄 -->  
              <host-deploy path="hosts">  
                <host-default>  
                  <resin:import path="host.xml" optional="true"/>  
                </host-default>  
              </host-deploy>  
              <!-- 默認(rèn)的虛擬主機(jī)配置 -->  
              <host id="" root-directory=".">  
                <!-- 配置默認(rèn)的應(yīng)用 webapp's ROOT        -->  
                <web-app id="/" root-directory="webapps/ROOT"/>  
                <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">  
                  <!--  管理應(yīng)用程序 /resin-admin password is the md5 hash of the password。md5碼的密碼。
          localhost is true to limit access to the localhost。localhost設(shè)置成true,這樣只有l(wèi)ocalhost才能訪問(wèn) -->  
                  <prologue>  
                    <resin:set var="resin_admin_user" value=""/>  
                    <resin:set var="resin_admin_password" value=""/>  
                    <resin:set var="resin_admin_external" value="false"/>  
                  </prologue>  
                </web-app>  
              </host>  
            </cluster>  
            <!--  Configuration for the web-tier/load-balancer  -->  
            <resin:if test="${resin.isProfessional()}">  
              <cluster id="web-tier">  
                <server-default>  
                  <!-- The http port -->  
                  <http address="*" port="9080"/>  
                </server-default>  
                <server id="web-a" address="127.0.0.1" port="6700"/>  
                <cache path="cache" memory-size="64M"/>  
                <host id="">  
                  <web-app id="/">  
                     <rewrite-dispatch>  
                       <load-balance regexp="" cluster="app-tier"/>  
                     </rewrite-dispatch>  
                  </web-app>  
                </host>  
              </cluster>  
            </resin:if>  
          </resin>  

          posted on 2008-03-04 11:10 都市淘沙者 閱讀(4929) 評(píng)論(2)  編輯  收藏 所屬分類: Tomcat/Weblogic/Resin/Jboss

          評(píng)論

          # re: Resin 3.1 配置文件詳細(xì)說(shuō)明 2008-10-17 10:01 glp

          請(qǐng)問(wèn)一下,在resin3.1.5以上的版本,<accept-buffer-size>這個(gè)參數(shù)還要不要呢?我在網(wǎng)上查了一下,好像以前的版本可以配置這個(gè)參數(shù),但在3.1.5 這個(gè)版本里面就加不了,只要一加就啟不動(dòng),提示無(wú)效的參數(shù)  回復(fù)  更多評(píng)論   

          # re: Resin 3.1 配置文件詳細(xì)說(shuō)明 2008-10-20 09:20 冰河快狼

          我看了一下官方網(wǎng)了解了一下,的確好象3.1.5之后的版本就沒(méi)有這個(gè)配置了.可能已經(jīng)將其默認(rèn)設(shè)置了,不用手動(dòng)設(shè)置 。
          官網(wǎng)上有句不是很清晰的話:
          The -Dcaucho.smallmem command-line argument tells Resin to shrink its buffer sizes for a small-memory footprint. For example, the main internal buffer size shrinks from 16k to 1k.

            回復(fù)  更多評(píng)論   

          主站蜘蛛池模板: 昌宁县| 石城县| 安庆市| 江都市| 清新县| 桦南县| 福贡县| 松江区| 遵义市| 萨嘎县| 武川县| 南漳县| 古蔺县| 惠东县| 确山县| 元阳县| 扎囊县| 申扎县| 巴中市| 上蔡县| 瑞金市| 兰坪| 崇信县| 乌拉特后旗| 景谷| 日喀则市| 东明县| 娄烦县| 岗巴县| 茶陵县| 娱乐| 双桥区| 遂昌县| 黎平县| 介休市| 福建省| 巴南区| 金堂县| 镇雄县| 天全县| 吉木乃县|