Originally posted by Michael J. Makunas:
What I mean is, that given the following assumptions:
1) I have 2 identical MySql databases running on two seperate servers.
2) These databases will allways be in sync and identical
Is there a way to set up Tomcat's conntion pooling so that when the app gets a connection from the pool it could be a connection to either of the dbs? Thus, distributing the load between 2 db servers.
uhhm, i have seen something close to this called multipools in weblogic where u have a primary pool and then you can bring one database server down(and hence the pool) and the datasource automatically points to the back up pool after that.
The datasource through which you connect to the database needs to be configured with a multipool. But the one you are looking for..
best left to the author / tomcat experts to answer.
So you want to distribute load only at the db level and not cluster the tomcat servers and distribute it that way. What you are looking for should be possible within a tomcat cluster.