oracle-ds.xml 配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@172.30.26.44:1521:orcl</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>hadiandev</user-name>
<password>hadiandev</password>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
<track-statements/>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<new-connection-sql>select 1 from dual</new-connection-sql>
<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>
</local-tx-datasource>
</datasources>