0
votes

I am trying to use a datasource to get connection to Oracle database.

I am setting the OracleConnectionCacheImpl object with properties like driverType, networkProtocol, user, password, databaseName, serverName, portNumber.

setUrl cannot be used.

What should I do to get a connection like in the case, if the following url is used ?

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on) (ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=host2) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=service_name)))

I hope I made some sense in what I told.

1

1 Answers

1
votes

For RAC, you need to set the URL. In my experience, if you do not set the URL explicitly, it will not work in this case. I am unable to comment, hence posting a new reply.