特殊WEB服务的配置

来源:互联网 发布:博客发帖软件 编辑:程序博客网 时间:2024/06/05 17:01

tomcat服务器配置

每个CONTEXT服务的配置:
For Tomcat 5, these entries in per-web-application InitialContext are configured in the <Context> elements that can be specified in either $CATALINA_HOME/conf/server.xml or, preferably, the per-web-application context XML file (either META-INF/context.xml).
e.g.:
webapp:%tomcat_home%/webapps/develop/
context.xml: %tomcat_home%/webapps/develop/META-INF/context.xml
<!-- context.xml content -->
<Context debug="0" reloadable="false">
    <!--c3p0-->
    <Resource name="jdbc/igrp" auth="Container" type="com.mchange.v2.c3p0.ComboPooledDataSource"
              maxPoolSize="200" minPoolSize="3" initialPoolSize="5" acquireIncrement="5"
              idleConnectionTestPeriod="60" maxIdleTime="60"
              driverClass="oracle.jdbc.driver.OracleDriver"
              user="carmot_changde" password="carmot"
              jdbcUrl="jdbc:oracle:thin:@192.168.1.12:1521:igrp"
              factory="org.apache.naming.factory.BeanFactory"/>
             
    <Resource name="jdbc/md" auth="Container" type="com.mchange.v2.c3p0.ComboPooledDataSource"
              maxPoolSize="30" minPoolSize="3" initialPoolSize="5" acquireIncrement="2"
              idleConnectionTestPeriod="60" maxIdleTime="60"
              driverClass="com.mysql.jdbc.Driver"
              user="root" password="root"
              jdbcUrl="jdbc:mysql://192.168.1.36:3306/md"
              factory="org.apache.naming.factory.BeanFactory"/>

   <Resource name="jdbc/sms" auth="Container" type="com.mchange.v2.c3p0.ComboPooledDataSource"
              maxPoolSize="30" minPoolSize="3" initialPoolSize="5" acquireIncrement="2"
              idleConnectionTestPeriod="60" maxIdleTime="60"
              driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
              user="sa" password="123456"
              jdbcUrl="jdbc:sqlserver://132.159.178.238:1433;DatabaseName=sms"
              factory="org.apache.naming.factory.BeanFactory"/>       
</Context>

原创粉丝点击