You can specify failover in the JDBC connection properties. For example;
Where "db_server1" & "db_server2" are the hostnames or IP's of your OTK Database servers and "otk_db" is the name of your database.
You will also need to make sure that the necessary MySQL grants are in place to allow all Gateway nodes to access the OTK DB.
1) Login to mysql
2) Execute the following query:
GRANT SELECT,UPDATE,DELETE,INSERT ON otk_db.* TO 'otk_user'@'host';