> -----Original Message-----
> From: Bill Davidson [mailto:bill...@gmail.com] 
> Sent: Tuesday, September 01, 2009 20:18
> To: 'Tomcat Users List'
> Subject: Using multiple DataSource's for fail-over.
> 
> Tomcat 6.0.20 using DBCP DataSource
> Java 1.6.0_16
> Oracle 10g with RAC.
> 
> I've got two Oracle RAC nodes, mirroring each other.  My 
> current fail-over method if the primary node fails is to shut 
> down the web servers, reconfigure them to use the secondary 
> node and restart the web servers.  Not pleasant.
> 
> I'm thinking I can make a "FailOverDataSource" that 
> implements DataSource and wraps around DataSource's for each 
> of the two nodes.  Its
> getConnection()
> method would try to use the getConnection() from the primary 
> node, and if that fails, it would try the secondary node.  
> Repeat logic for other DataSource methods.  Instant automagic 
> fail-over.  I've actually written it, and it seems to get a 
> hold of both DataSource's fine.  I can't kill the primary on 
> an active busy system to do a "real" test though.

Try a software firewall like iptables (linux) or the windows firewall. This way
you can simulate an in communication break, just like swithcing off the server. 

> 
> I'm thinking I can't be the first person to think of this.  
> Are there any obvious problems with this idea?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 




--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to