MySQL Fabric failover and Connection Pooling with Hibernate -


i'm attempting implement automatic failover via mysql fabric server group using jndi resource, hibernate, , connection pooling. our db farm setup mysql fabric , i'm attempting implement client/connector.

i have jndi resource declared in server.xml file has mysql fabric-based url , driver, , uses connection pooling hibernate.

<resource name="jdbc/myapp" type="javax.sql.datasource" driverclassname="com.mysql.fabric.jdbc.fabricmysqldriver" maxwait="1000" url="proper.fabric.url/fabricservergroup=myfabricgroup" maxactive="45" validationquery="select 1 dual" /> 

the problem i'm having connection pooling , fabric not play together. after taking down master db, fabric automatically promotes slave expected. however, when attempt make new connection db i'm getting old now-defunct connections back, notably i'm getting read-only connection when i'm requesting readwrite. additional info if restart tomcat server , ask fresh connection correct results. problem i'm having occurs because of connection pooling.

what need know if there's key/value pair i'm missing make fabricdriver smart enough know wipe connection pool when automatic failover occurs.

the best i've found use testonborrow, unfortunately can use select query (via validationquery), still succeeds when i'm getting read-only connection despite asking readwrite.

has solved issue before?

note: if attempt use com.mysql.fabric.jdbc.fabricmysqldatasource can't make connections. regular javax.sql.datasource seems correct value here.

second note: i'm using mysql-connector-java version 5.1.35

just heard oracle, apparently known bug , going fixed in upcoming release: 5.1.36


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -