JBoss Version: 6x
Oracle Version: 11g
Driver: JDBC Thin Driver
I have -ds.xml (datasource file) which looks like:
<datasources>
<local-tx-datasource>
<jndi-name>MYOraDBSource</jndi-name>
<connection-url>jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = somehost.domain.com) (PORT = 1523))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = whatever)))</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
....
</local-tx-datasource>
</datasources>
Question :
1. What changes do i need to make above to connect to Oracle RAC, so that fail-over can happen correctly.
2. In case of Apache DBCP, it appears that: there is a TestOnBorrow property. Do i need some equivalent of that here?
3. Have also been told that JDBC Thin Driver does not support Oracle RAC fail-over. Is this true? Could not find a definitive answer.
Anyone?
Try this:
<local-tx-datasource>
<jndi-name>MYOraDBSource</jndi-name>
<connection-url>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1.domain.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=host2.domain.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=whatever)))</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
...
</local-tx-datasource>
This has been used on JBoss 5.1.0, so maybe it will work for JBoss 6.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.