On Mar 11, 2013, at 10:09 AM, amit shah wrote: > Apparently we use Oracle as our data store while the solution you mentioned > is for mysql.
I'm not an Oracle guy, but I'm pretty sure that it supports failover. Not sure it's as simple as changing the JDBC URL though, you'll probably want to check with your DBA to figure out more. > > Is there a way tomcat can provide a notification after all its retries to > the database server have failed? This should throw an exception and indicate it was unable to create a connection. I suppose that you could catch this and do something else. It's not the best approach though. I think the JDBC driver could handle this more seamlessly, since it's closer to the DB. > This way at least I can create a new > connection pool configured to a different database server in order to > simulate a automatic connection failover from the application side. I > understand that this step would require time for the retries and creation > of new pool. Perhaps you could create two datasources on startup, a primary and a secondary. The application would always default to the primary, unless it couldn't get a connection. Then it would use the secondary. Not a great solution, but sounds similar to what you mentioned. Dan > > Thanks. > > > On Mon, Mar 11, 2013 at 6:15 PM, Daniel Mikusa <dmik...@vmware.com> wrote: > >> On Mar 11, 2013, at 12:52 AM, amit shah wrote: >> >>> Hello, >>> I would like to know if the tomcat jdbc pool (7.0.34+) provides >>> connection failover capabilities i.e. to transparently close all the open >>> database connections and switch to a another database server on an >>> planned/unplanned database server outage event. >>> I read through the tomcat documentation but didn't find any >> details >>> related to this. If this feature is not supported are there any >> recommended >>> alternatives and any future plans to add this feature to the jdbc pool? >> >> You might want to see if your JDBC driver will handle this for you. I >> know that some do, like MySQL [1]. >> >> Dan >> >> [1] - >> https://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html >> >>> >>> Thank you, >>> Amit >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org