<p>Yes I know the javadocs of the flags, it&#39;s the cache integration with hibernate&#39;s state which uses a transactional synch which puzzles me: it seems we want the change to be transactional, and at the same time apply flags which express &quot;we don&#39;t care for consistency&quot;. What is the intention?<br>

</p>
<div class="gmail_quote">On Nov 17, 2011 10:27 AM, &quot;Galder Zamarreño&quot; &lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It&#39;s on my TODO list to create a wiki on it: <a href="https://issues.jboss.org/browse/ISPN-1120" target="_blank">https://issues.jboss.org/browse/ISPN-1120</a><br>
<br>
The javadoc should be clear enough but basically, it&#39;s a put operation geared towards best-effort, when you&#39;re trying to put somewhere read from an external source.<br>
<br>
<a href="http://www.slideshare.net/galderz/infinispan-for-dummies" target="_blank">http://www.slideshare.net/galderz/infinispan-for-dummies</a> - slide 12 for characteristics of a PFER as opposed to a Put<br>
<br>
On Nov 17, 2011, at 9:36 AM, Sanne Grinovero wrote:<br>
<br>
&gt; Hi Galder,<br>
&gt; could you explain some details of the use case / requirements of<br>
&gt; putForExternalRead ? I&#39;m assuming you&#39;re talking about the Hibernate<br>
&gt; 2nd level cache, but I don&#39;t know exactly how that is designed, do we<br>
&gt; have some documentation about it?<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Sanne<br>
&gt;<br>
&gt; On 17 November 2011 09:30, Galder Zamarreño &lt;<a href="mailto:galder.zamarreno@redhat.com">galder.zamarreno@redhat.com</a>&gt; wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Forcing caches to be either transactional or non transactional caches causes some issues with operations such as putForExternalRead with default configuration options.<br>
&gt;&gt;<br>
&gt;&gt; Assuming we have a transactional cache, if autoCommit is on (default), putForExternalRead will:<br>
&gt;&gt; 1. Suspend the ongoing transaction<br>
&gt;&gt; 2. Will create a brand new transaction due to implicit transaction creation logic in auto commit.<br>
&gt;&gt;<br>
&gt;&gt; This is not good.<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t think we can just disable autoCommit globally if someone calls putForExternalRead because there might other operations not called within a transaction, but there&#39;s a point to be made here:<br>
&gt;&gt; The whole point of calling PFER is to suspend on-going transactions, so it kinda implies that transactions are managed externally already.<br>
&gt;&gt;<br>
&gt;&gt; If we don&#39;t disable autoCommit globally, there&#39;s a few things that we should consider doing:<br>
&gt;&gt; 1. Print a WARN if PFER is called and autoCommit is on?<br>
&gt;&gt; 2. Apart from the message, some kind of way for putForExternalRead to instruct the implicit transaction logic to avoid creating a new transaction in this case.<br>
&gt;&gt;<br>
&gt;&gt; WDYT?<br>
&gt;&gt; --<br>
&gt;&gt; Galder Zamarreño<br>
&gt;&gt; Sr. Software Engineer<br>
&gt;&gt; Infinispan, JBoss Cache<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
--<br>
Galder Zamarreño<br>
Sr. Software Engineer<br>
Infinispan, JBoss Cache<br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div>