Note that there are some explanatory texts on larger screens.

plurals
  1. POspring + hibernate + data base connection pooling and high availability
    primarykey
    data
    text
    <p>I'm trying to configure my web application like this: 1 tomcat server 2 mysql data bases in master/ master replication for failover purpose.</p> <p>I also succeded to set up a pooled connexion using c3p0, thus avoiding to open a new connexion for each request(when no failover is involved) </p> <p>I would like to use the failover support porvided by the jdbc connector in order to route request to the second database when the first one is unavailabe. Thus i'm using the fail over capability of the jdbc driver, simply by providing extra configuration parameters.</p> <p>For the moment, when one server is unvailable, the requst are routed to the second available server. However, i'm facing a problem with a new opened connexion on the database for each request. </p> <p>It seems that combaining connexion pooling and jdbc failover dosen't work toogther ?</p> <p>Please advice, also regarding configuration parameters </p> <pre><code>&lt;bean id="mydataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt; &lt;property name="driverClass" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="jdbcUrl" value="jdbc:mysql://localhost:3306,myOtherServer:3306/zeus?autoCommit=true&amp;amp;autoReconnect=true&amp;amp;autoReconnectForPools=true&amp;amp;failOverReadOnly=false"/&gt; &lt;property name="user" value="root" /&gt; &lt;property name="password" value="root" /&gt; &lt;!-- these are C3P0 properties --&gt; &lt;!-- property name="acquireIncrement" value="${acquireIncrement}" /_--&gt; &lt;property name="minPoolSize" value="6" /&gt; &lt;property name="maxPoolSize" value="10" /&gt; &lt;property name="maxIdleTime" value="100" /&gt; &lt;/bean&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload