Hi guys,

I am currently using Cayenne 3.0M4 in a web application, using a MySQL database.

I have been asked to modify the application so that we can perform reads from one of N slave database servers, but writes will occur only on one master database server.

Is it possible to do this with Cayenne? Anyone know how? =)

I've looked at this briefly:
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-replication-connection.html

... So it looks like I could configure a JNDI datasource that represents the master + all the slaves pretty easily. I just don't know how to get Cayenne to call "connection.setReadOnly(...)" as necessary.


Thanks!


Mike Shea.

Reply via email to