I think I misunderstood your patch. I thought it might make setReadOnly redundant, since the query or proc call itself makes the consequences obvious, ie. Discrete SELECT calls are always read-only, whereas UPDATE, INSERT, etc. are plainly write statements.
My Model API wraps Hibernate and our model up in the system I'm working on certainly knows, and I've been setting setReadOnly appropriately. However, setting readOnly on the raw JDBC Connection through the "deprecated" session.connection() call (see
http://forum.hibernate.org/viewtopic.php?t=974518) appears in my tests to often get lost before the SQL is actually executed. I call setReadOnly(false) on insert/update calls, and get the unhappy exceptions of connection is read only, update failed, etc.
Our operations group was asked by my manager to spend time puttting together a MySQL master/slave "cluster". Now, I'm stuck with the task of configuring our already completed system to work with the cluster, and only roadblock in my path.
Has anyone successfully integrated a MySQL master/slave cluster with Hibernate? If so, what changes to your code or config did you need to make? I'd like to know. :)
Thanks,
Tom
thomas (dot) harris (at) sourcemedia (dot) com