容器配置jndi Tomcat为例

context.xml 文件
<Resource name="spring/sjpt" auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="" maxIdle="" maxWait="" 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
上一篇:Apache2配置多域名站点及支持https


下一篇:VirtualBox集群建立和网络配置