oracle使用c3p0配置集群的方法

oracle.driver=oracle.jdbc.driver.OracleDriver
oracle.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.32)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.33)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = SHOP)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))
oracle.username=oracle
oracle.password=oracle123

HOST 后面是ip地址,如果有超过2个就按类似格式配置即可。

注意配置的时候,把换行字符去掉,这长串字符写在一行.

相关推荐