For a full implementation, I would like to see this exposed as a policy
such that the deployer can choose the failover policy
(and potentially load balancing policy if the db supports it correctly).

This will require not just checking for errors at connection construction time,
but also tracking failures from matchManagedConnections (checkValidConnection)
and runtime errors checkError/ExceptionSorter.
The ExceptionSorter would need to know the difference between
a FATAL error (the connection is broken) versus a FAILOVER error
(the database is broken).

Extra consistency could also be added by extending the ConnectionEventListener
interface with a propriatory interface, adding

  | void connectionFailoverOccurred(ConnectionEvent event);
  | 

This would allow the adapter to signal that the connection should be closed
once the application has finished with it, as opposed to the
connectionErrorOccurred which signals immediate destruction.

With this extra method, the pluggable policy could choose a "first available"
type policy.
e.g. 
1) main db server fails so JBoss fails over to secondary/backup server
2) it remains sticky on that server until the main server is back
3) it then hands out connections from the main server and tells the 
listeners (JBoss's connection manager/pool) that the connections to the
backup server should be closed when the applications have finished
with the current requests.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871017#3871017

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3871017


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to