Some JDBC drivers already have that behaviour built-in and thus it becomes transparent to the client.
Cheers Daniel On Sat, Apr 27, 2013 at 10:07 AM, Romain Manni-Bucau <[email protected]>wrote: > Hi > > Reproduced jboss behavior by.default. concretely: if getconnection fails > then try next db. > > I added strategy for read only cases (rdbms have an issue with write case > by design) > Le 27 avr. 2013 02:02, "David Blevins" <[email protected]> a écrit : > > > Noticed the work going on with TOMEE-912 and wanted to make sure it hit > > the dev list. > > > > Anish, if you have any insight on this feature request that'd be > > wonderful. Some questions: > > > > - Is this feature intended for use involving database writes and > > transactions? > > - Is this really load balancing rather than failure recovery? I.e. when > > should the functionality kick in, a or b or both? > > a) Load-balancing scenario: before starting a transaction, pick a > > datbase using some selection strategy (round-robin, random, sticky, etc.) > > b) Failure scenario: while in a transaction communicating with a > > databse, if it fails to respond then failover to another database using > > some selection strategy (round-robin, random, sticky, etc.) > > > > > > I can see A being very doable. Doing B could also possibly be doable as > > long as no writes were involved. > > > > If you have any information you can share about your setup that'd be > > wonderful. > > > > > > -David > > > > > > > > >
