Hi Anand,
You can specify failover in the JDBC connection. For example;
jdbc:mysql://ssg1:3306,ssg2:3306/otk_db?failOverReadOnly=false&autoReconnect=true&connectTimeout=1
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.
Regards,
Joe