spring-xd job repository datasource enable oracle fast connection failover

420 views Asked by At

In Spring-XD clustered environment, we are using Oracle as job repository datasource. Right now, this has been configured through servers.yml. But, we have to enable fast connection failover (FCF) for High availability (HA). Does current servers.yml support this? Or Is there a way to replace job repository data source with Oracle Pool DataSource with ONS configuration. Please advise me with any solution?

1

There are 1 answers

7
hlagos On

you should be able to configure your datasource like any spring datasource. did you try configure the datasource like this http://docs.spring.io/spring-data/jdbc/docs/current/reference/html/orcl.failover.html ?

you have to include your configuration like

datasource:
  url: jdbc:"jdbc:oracle:thin:@(description=(address_list=(address=(host=rac1)(protocol=tcp)(port=1521))(address=(host=rac2)(protocol=tcp)(port=1521)))(connect_data=(service_name=racdb1)))"
  username: sa
  password:
  driverClassName: oracle.jdbc.driver.OracleDriver
  validationQuery: select 1 from INFORMATION_SCHEMA.SYSTEM_USERS
  fast-connection-failover-enabled:true
  ONS-configuration="rac1:6200,rac2:6200"

Let me know if that works, I am curious :)