日期:2014-05-16 浏览次数:20457 次
<Resource name="jdbc/my" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" auth="Container" type="javax.sql.DataSource" url="jdbc:mysql://**.**.**.**:3306/**" driverClassName="com.mysql.jdbc.Driver" username="**" password="**" initialSize="30" minIdle="5" maxIdle="50" maxActive="100" maxWait="10000" jmxEnabled="true" testOnBorrow="true" testWhileIdle="true" validationQuery="select 1" validationInterval="30000" />
<ResourceLink global="jdbc/my" name="jdbc/my" type="javax.sql.DataSource"/>
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>java:comp/env/jdbc/my</value> </property> </bean>