On Nov 20, 2007 12:11 AM, Ezra Epstein <[EMAIL PROTECTED]> wrote:
> I imagine that if you use Spring's declarative transactions on the service 
> layer so that the read()/get() method does not start a read/write transaction 
> but the save() method does then changing the object without calling "save()" 
> should just work - you won't be in a read/write tx and so the changes to the 
> object won't be persisted.  I haven't tested this.

Ezra, i ran across the following thread when researching related issues:
http://forum.hibernate.org/viewtopic.php?t=972377

Quote from one of the hibernate team:
"Read-only transactions are _not_ the same as session.setReadOnly() or
query.setReadOnly(). The first is a hint for weak DBMS implementations
that you only want to do SELECTs - a good DBMS transaction system
should figure this out automatically. The latter is a setting that
disables object snapshots at the Hibernate persistence context level."

I'm not using spring currently so haven't verified any of this.  Just
thought you might like to know.

Cheers, lasitha.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to