Re: Using multiple DataSource's for fail-over.
I don't think. Did you try shutting down one node? You can also look at netadmin tutorial to see what FAILOVER means. On Fri, Sep 4, 2009 at 11:58 AM, Bill Davidsonbill...@gmail.com wrote: Mohit Anchlia wrote: Something like this: (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) I still haven't been able to locate the documentation, but that seems to make connections. I'm wondering if I need to configure the DBCP connectionProperties attribute with anything special for fail-over? - 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
Re: Using multiple DataSource's for fail-over.
Mohit Anchlia wrote: Something like this: (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) I still haven't been able to locate the documentation, but that seems to make connections. I'm wondering if I need to configure the DBCP connectionProperties attribute with anything special for fail-over? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
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
RE: Using multiple DataSource's for fail-over.
-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 x333Baltimore, 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
Re: Using multiple DataSource's for fail-over.
I thought the Oracle JDBC driver allowed for all the nodes to be placed into the connect string and the driver was smart enough to detect failover. [So its a configuration exercise on the connection string.] -Tim Ognjen Blagojevic wrote: 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. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
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
Re: Using multiple DataSource's for fail-over.
Ognjen Blagojevic wrote: 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? Actually, it doesn't switch which is the primary. It keeps trying the primary every time and failing over to the secondary every time the primary fails. When the primary comes back, it will get the primary. Basic logic is this: try{ conn = primary.getConnection(); }catch ( SQLException e ){ conn = secondary.getConnection(); } return conn; I'm a little concerned that the first failure might take time due to having to wait on a timeout or something like that. That could kill performance, so that's one of the reasons I'm asking about it here. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
Tim Funk wrote: I thought the Oracle JDBC driver allowed for all the nodes to be placed into the connect string and the driver was smart enough to detect failover. [So its a configuration exercise on the connection string.] I'm having trouble finding documentation for this capability. Can you or someone else provide a pointer? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
Did you look at Oracle RAC docs? On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidsonbill...@gmail.com wrote: Tim Funk wrote: I thought the Oracle JDBC driver allowed for all the nodes to be placed into the connect string and the driver was smart enough to detect failover. [So its a configuration exercise on the connection string.] I'm having trouble finding documentation for this capability. Can you or someone else provide a pointer? - 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
Re: Using multiple DataSource's for fail-over.
Something like this: (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) On Wed, Sep 2, 2009 at 11:53 AM, Mohit Anchliamohitanch...@gmail.com wrote: Did you look at Oracle RAC docs? On Wed, Sep 2, 2009 at 11:10 AM, Bill Davidsonbill...@gmail.com wrote: Tim Funk wrote: I thought the Oracle JDBC driver allowed for all the nodes to be placed into the connect string and the driver was smart enough to detect failover. [So its a configuration exercise on the connection string.] I'm having trouble finding documentation for this capability. Can you or someone else provide a pointer? - 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
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. 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