Details
Description
Starting with Connector/J 3.1.7, a MySQL JDBC driver is available [2] that will automatically send queries to a read/write master, or a failover or round-robin loadbalanced set of slaves based on the state of Connection.getReadOnly() .
OpenJPA can take advantage of this driver by setting up read-only property of the connection based on the dirty nature of the current transaction [1].
[1] http://n2.nabble.com/Mysql-Connector-J-ReplicantConnection-tc2431984.html
[2] http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-replication-connection.html