Open session in view is meant to be read-only.
When the call to the manager return (inside the controller) the
transaction is commited and the transactionManager change its flushMode
temporaly to reset it just after to never (Aka read only), thus when
the control is passed to rendering the transaction is back in read
only mode.
This is taken from the javadoc of OSVF :
* <p><b>NOTE</b>: This filter will by default <i>not</i> flush the
Hibernate Session,
* with the flush mode set to <code>FlushMode.NEVER</code>. It assumes
to be used
* in combination with service layer transactions that care for the
flushing: The
* active transaction manager will temporarily change the flush mode to
* <code>FlushMode.AUTO</code> during a read-write transaction, with the
flush
* mode reset to <code>FlushMode.NEVER</code> at the end of each
transaction.
* If you intend to use this filter without transactions, consider changing
* the default flush mode (through the "flushMode" property).
Cheers
Doug Pham a écrit :
You may have ran across this along the way. Each time I used the DAO
to make a call, the session seems to get closed. If I used the
OpenViewFilter, the session is open, but it's in a READ-ONLY mode. I
know I am not posting any code here, but has anyone ran across this
and have a correct way of setting this?
Thanks,
Doug
------------------------------------------------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
it now.
<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20>
--
Michael Courcy
http://courcy.blogspot.com
http://courcy-en.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]