|
From: <jue...@we...> - 2004-08-03 13:29:42
|
It's essentially just a hint. Transaction managers will try to apply it =
wherever they can: For example, a transactional JDBC Connection will =
receive a corresponding setReadOnly(true) call, and a transactional =
Hibernate Session will be turned to FLUSH_NEVER. While the former is =
neglected by most JDBC drivers, the latter avoids unnecessary dirty =
checking of all objects loaded by the current Session.
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of James Cook
Sent: Tuesday, August 03, 2004 3:25 PM
To: spr...@li...
Subject: [Springframework-developer] Significance of 'readonly'?
When using the following bean definition:
<bean id=3D"petStore" class=3D
"org.springframework.transaction.interceptor.TransactionProxyFactoryBean"=
>
<property name=3D"transactionManager">
<ref bean=3D"transactionManager"/>
</property>
<property name=3D"target">
<ref bean=3D"petStoreTarget"/>
</property>
<property name=3D"transactionAttributes">
<props>
<prop =
key=3D"insert*">PROPAGATION_REQUIRED,-MyCheckedException</prop>
<prop key=3D"update*">PROPAGATION_REQUIRED</prop>
<prop key=3D"*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
What is the significance of the readOnly attribute in the property list? =
Is
this just a "hint" passed to certain transaction managers that may be =
able
to optimize these methods, or does it result in a specific, repeatable
behavior?
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|