Hey, *GOAL:* I am trying to allow my microservice to be able to establish a new datasource if the current datasource becomes invalid (in the case the db fails).
*Option 1:* The database that my dropwizard microservice is connected supports Fast-Connection-Failover (FCF). Currently, I am supporting FCF using JDBC in my main app. From what I have read, I do not believe that JDBI has that functionality to interface with Oracle Notification Service. Does anyone know if it is possible through JDBI? And can point me to some resources. *Option 2:* My other option was to auto reconnect to the datasource upon failure. To do this, I thought I would re-establish a datasource connection dynamically assuming the datasource has the same configuration as the original. For example, I was thinking of prior to calling my SQL Query to run a validateDatasource() type method that would run a validation query against the current datasource connection. If it was successful then all is fine and dandy, if not, I would try to build a new DBI until successful. But I am not sure if it is possible to reassign the datasource outside of the dropwizard-app's run() method. *Option 3:* I read the documentation about Managed Objects (http://www.dropwizard.io/1.2.2/docs/manual/core.html#managed-objects) I was wondering if it would make sense to have my datasource as a manage object that I could have a restart method attached to and run that at any point. Any help or information that'll point me in the right direction is much appreciated, Alexander -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
