欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

oracle使用c3p0配置集群的方法

程序员文章站 2022-07-14 21:14:53
...

 

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个就按类似格式配置即可。

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