笔记(oracle-ds.xml)数据库重新连接

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>jdbc/gomeDS</jndi-name>
    <connection-url>jdbc:oracle:thin:@172.31.90.105:1521:ohome</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>ohometest</user-name>
    <password>ohometest</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <!-- 数据库断掉后自动重连 -->
	<valid-connection-checker-class-name> 
		org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker 
	</valid-connection-checker-class-name>
<!-- 数据库断掉后自动重连 -->

	<metadata>
        <type-mapping>Oracle9i</type-mapping>
    </metadata>
  </local-tx-datasource>
</datasources>

你可能感兴趣的:(oracle)