<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6098392112071095875.post8537592979748540050..comments</id><updated>2012-01-30T09:34:08.668-05:00</updated><category term='Hibernate'/><category term='Code'/><category term='Productivity'/><category term='Opinion'/><category term='Spring'/><category term='Performance'/><category term='Agile'/><category term='Java'/><category term='Scrum'/><title type='text'>Comments on Code Instructions: Read-Only transactions with Spring and Hibernate</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.codeinstructions.com/feeds/8537592979748540050/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html'/><author><name>Domingos Neto</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://2.bp.blogspot.com/_HHFrwTieqY8/STh7yQ1m0bI/AAAAAAAAABs/8BJWpydZgZ4/S220/cruzes.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6031774220903993196</id><published>2011-11-07T09:44:00.120-05:00</published><updated>2011-11-07T09:44:00.120-05:00</updated><title type='text'>Note that when using Spring with Hibernate you gen...</title><content type='html'>Note that when using Spring with Hibernate you generally use HibernateTemplate...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And guess what? There&amp;#39;s another security at this level:&lt;br /&gt;org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1175)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6031774220903993196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6031774220903993196'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1320677040120#c6031774220903993196' title=''/><author><name>Sébastien Lorber</name><uri>http://www.blogger.com/profile/16535575273136501866</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-125667231'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6740353616672018141</id><published>2011-11-02T17:17:58.067-04:00</published><updated>2011-11-02T17:17:58.067-04:00</updated><title type='text'>This really good article. I have question for auth...</title><content type='html'>This really good article. I have question for author. You mention at the end that - &amp;quot;Even during Spring read-only transactions, Hibernate queries still save the state of persistent objects in the session cache&amp;quot;. &lt;br /&gt;&lt;br /&gt;What happens to these object that are change in cached? &lt;br /&gt;Do they get written to database at any point?&lt;br /&gt;If different session does flush, do these object get persisted at point of time?&lt;br /&gt;If different session is trying to access object which is modified in cache by different read only session. will first session get the value from cache?&lt;br /&gt;&lt;br /&gt;I would appreciate if you answer above.&lt;br /&gt;&lt;br /&gt;Thanks in advance.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6740353616672018141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6740353616672018141'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1320268678067#c6740353616672018141' title=''/><author><name>Shrikant Patel</name><uri>http://www.blogger.com/profile/09166228156275354489</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-372790265'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-8350851809488034227</id><published>2011-06-22T04:10:08.146-04:00</published><updated>2011-06-22T04:10:08.146-04:00</updated><title type='text'>Hi, AFAIK it is different when you set read only t...</title><content type='html'>Hi, AFAIK it is different when you set read only transaction and read-only JDBC connection on Oracle. But I have forgotten already the details.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/8350851809488034227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/8350851809488034227'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1308730208146#c8350851809488034227' title=''/><author><name>Ondrej Medek</name><uri>http://www.blogger.com/profile/02465917905307330831</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1294728423'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-6080858010988080246</id><published>2010-11-03T12:15:10.359-04:00</published><updated>2010-11-03T12:15:10.359-04:00</updated><title type='text'>Artem is right. Unfortunately read-only connection...</title><content type='html'>Artem is right. Unfortunately read-only connections are not supported by the Oracle JDBC Drivers.&lt;br /&gt;Here&amp;#39;s an excerpt from the JDBC Developer’s Guide and Reference&lt;br /&gt;10g Release 2 (10.2):&lt;br /&gt;&lt;br /&gt;&amp;quot;Read-only connections are supported by the Oracle server, but not by the Oracle JDBC drivers.&lt;br /&gt;&lt;br /&gt;For transactions, the Oracle server supports only the TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE transaction isolation levels. The default is TRANSACTION_READ_COMMITTED.&amp;quot;&lt;br /&gt;&lt;br /&gt;So TRANSACTION_READ_ONLY isolation level cannot be set through the Oracle JDBC driver.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6080858010988080246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/6080858010988080246'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1288800910359#c6080858010988080246' title=''/><author><name>Andrei</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-520409709'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5146359087883331853</id><published>2010-08-10T14:48:20.663-04:00</published><updated>2010-08-10T14:48:20.663-04:00</updated><title type='text'>Isn&amp;#39;t the session cache also used to prevent h...</title><content type='html'>Isn&amp;#39;t the session cache also used to prevent having to load the same object twice? That&amp;#39;s still useful, even for a read-only transaction.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/5146359087883331853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/5146359087883331853'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1281466100663#c5146359087883331853' title=''/><author><name>Pepijn</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-251764589'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-2927636200539477381</id><published>2010-05-02T15:05:23.735-04:00</published><updated>2010-05-02T15:05:23.735-04:00</updated><title type='text'>Yup, helpful. Thanks.</title><content type='html'>Yup, helpful. Thanks.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/2927636200539477381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/2927636200539477381'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1272827123735#c2927636200539477381' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1705550765'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-1794434856151416607</id><published>2010-03-04T11:25:29.482-05:00</published><updated>2010-03-04T11:25:29.482-05:00</updated><title type='text'>&amp;quot;When using the Oracle JDBC driver, calling c...</title><content type='html'>&amp;quot;When using the Oracle JDBC driver, calling connection.setReadOnly(true) translates into the statement &amp;quot;SET TRANSACTION READ ONLY&amp;quot;.&lt;br /&gt;It&amp;#39;s not true, oracle docs says that they do not support read-only connections (http://www.oracle.com/technology/docs/tech/java/sqlj_jdbc/doc_library/javadoc/oracle.jdbc.driver.oracleconnection.html#setReadOnly%28boolean%29). I also wrote simple test that confirms that. At least I could do SELECT ... FOR UPDATE w/o any exception.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/1794434856151416607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/1794434856151416607'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1267719929482#c1794434856151416607' title=''/><author><name>Artem</name><uri>http://www.blogger.com/profile/06908778694732339503</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-967710353'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-7800967927537942993</id><published>2010-01-08T01:34:28.270-05:00</published><updated>2010-01-08T01:34:28.270-05:00</updated><title type='text'>You rock man. Great post. Keep it up.</title><content type='html'>You rock man. Great post. Keep it up.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/7800967927537942993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/7800967927537942993'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1262932468270#c7800967927537942993' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-133349809'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-672200727474793323</id><published>2009-08-09T20:00:52.870-04:00</published><updated>2009-08-09T20:00:52.870-04:00</updated><title type='text'>thank you very much!! great helpfull post!!</title><content type='html'>thank you very much!! great helpfull post!!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/672200727474793323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/672200727474793323'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1249862452870#c672200727474793323' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-452977686'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-5967396383039644439</id><published>2009-07-16T10:44:18.243-04:00</published><updated>2009-07-16T10:44:18.243-04:00</updated><title type='text'>I question the stmt in the last para:

If you stil...</title><content type='html'>I question the stmt in the last para:&lt;br /&gt;&lt;br /&gt;If you still want to prevent Hibernate from saving the object state in the session cache, you have to manually run the HQL queries in read-only mode. It would be a nice improvement to Hibernate to have a read-only mode to the session so that no object state is stored and no flush executed.&lt;br /&gt;&lt;br /&gt;The Hibernate Session has a method:&lt;br /&gt;&lt;br /&gt;void setReadOnly(Object entity, boolean readOnly)&lt;br /&gt;&lt;br /&gt;Set an unmodified persistent object to read only mode, or a read only object to modifiable mode.&lt;br /&gt;&lt;br /&gt;This applies to the object, not to the entire session but it does what you want for the object.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/5967396383039644439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/5967396383039644439'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1247755458243#c5967396383039644439' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1829924213'/></entry><entry><id>tag:blogger.com,1999:blog-6098392112071095875.post-9009690544792068788</id><published>2009-05-28T19:53:29.514-04:00</published><updated>2009-05-28T19:53:29.514-04:00</updated><title type='text'>Thanks! that was really useful.</title><content type='html'>Thanks! that was really useful.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/9009690544792068788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6098392112071095875/8537592979748540050/comments/default/9009690544792068788'/><link rel='alternate' type='text/html' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html?showComment=1243554809514#c9009690544792068788' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.codeinstructions.com/2009/04/read-only-transactions-with-spring-and.html' ref='tag:blogger.com,1999:blog-6098392112071095875.post-8537592979748540050' source='http://www.blogger.com/feeds/6098392112071095875/posts/default/8537592979748540050' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-751609495'/></entry></feed>
