tomcat datasource 链接池 或jotm

1.tomcat 的server文件中配置datasource:

       <Context docBase="D:\helios_workspace\statistic\WebContent" path="/statistic">
                    <Resource name="jdbc/statistic"
                     auth="Container"
                     type="javax.sql.DataSource"
                     username="root"
                     password="root"
                     driverClassName="com.mysql.jdbc.Driver"
                     url="jdbc:mysql://localhost:3306/statistic"
                     maxActive="4"
                     maxIdle="4"/>
                </Context>

 

2.jotm的配置方法:

 <Context docBase="jbpm_ssh" path="/jbpm_ssh" reloadable="true"
     source="org.eclipse.jst.jee.server:jbpm_ssh">
     <Resource name="jdbc/mvnstruts2" auth="Container"
      type="javax.sql.DataSource" factory="org.objectweb.jotm.datasource.DataSourceFactory"
      driverClassName="oracle.jdbc.driver.OracleDriver" username="kevin"
      password="asdfff" url="jdbc:oracle:thin:@192.168.1.101:1521:XE" />
     <Resource name="UserTransaction" auth="Container"
      type="javax.transaction.UserTransaction" />
     <Transaction factory="org.objectweb.jotm.UserTransactionFactory"
      jotm.timeout="60" />
    </Context>

你可能感兴趣的:(tomcat,jdbc,dataSource,jotm)