Cayenne + master/slave mysql database replication

From: Michael Shea (mik..itido.com)
Date: Mon Feb 09 2009 - 18:04:48 EST

  • Next message: Andrus Adamchik: "Re: Cayenne + master/slave mysql database replication"

    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.



    This archive was generated by hypermail 2.0.0 : Mon Feb 09 2009 - 18:05:24 EST