码迷,mamicode.com
首页 > 其他好文 > 详细

容器配置jndi Tomcat为例

时间:2016-08-11 13:03:45      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

context.xml 文件
<Resource  name="spring/sjpt" auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="20" maxIdle="10" maxWait="10000" password="spsj" type="javax.sql.DataSource" url="jdbc:oracle:thin:@172.30.114.44:1521:spsj" username="spsj"/>

使用:

torque.properties
    torque.database.default=ups 
    torque.database.ups.adapter=oracle 
    
    torque.dsfactory.ups.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
    torque.dsfactory.ups.jndi.path=java:comp/env/spring/sjpt

log4j.xml
<appender name="db" class="com.Appender">
        <param name="jndiDataSource" value="java:comp/env/spring/sjpt" />

jdbc.properties

jndi.name=java:comp/env/spring/sjpt

 

容器配置jndi Tomcat为例

标签:

原文地址:http://www.cnblogs.com/sprinng/p/5760294.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!