Bill,

If you are using Oracle RAC, then why dont you use a RAC JDBC URL that contains both nodes? A DBCP testOnBorrow will ensure only current transactions on a node will fail if one of the nodes goes down, and all new requests for connections from the pool will "recover".

Bap.


Quoting Ognjen Blagojevic <ogn...@etf.bg.ac.rs>:

This is interesting topic.

IANA-failover-expert, but one question comes to my mind. What happens when the first server is recovered? Some cached connections will still point to second server, while newly created connections will go to the first one?

Is that acceptable?

Regards,
Ognjen

Bill Davidson wrote:
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.

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




---------------------------------------------------------------------
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

Reply via email to