<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RetryingTransactionHelper learnings in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157396#M111581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry for pumping this up, but have not found many more references related to this topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is RTH supposed to work with 'requiresNew' set to&amp;nbsp;false?&lt;/P&gt;&lt;P&gt;Been debugging code (repo 5.2.f), and when an&amp;nbsp;exception is thrown inside the for loop, it just quits it and does not retry,.. so, don't&amp;nbsp;understand &amp;nbsp;the utility of having this as a parameter, if it will never do as its name says (retry)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guess i'm taking something for granted, .. any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2017 08:20:26 GMT</pubDate>
    <dc:creator>iru</dc:creator>
    <dc:date>2017-05-25T08:20:26Z</dc:date>
    <item>
      <title>RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157395#M111580</link>
      <description>The key method in the above is:&amp;nbsp;&amp;nbsp;&amp;nbsp; public &amp;lt;R&amp;gt; R doInTransaction(RetryingTransactionCallback&amp;lt;R&amp;gt; cb, boolean readOnly, boolean requiresNew)‍where:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @param requiresNew&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tt&amp;gt;true&amp;lt;/tt&amp;gt; to force a new transaction or&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tt&amp;gt;false&amp;lt;/tt&amp;amp;</description>
      <pubDate>Wed, 04 Jun 2008 03:09:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157395#M111580</guid>
      <dc:creator>jharrop</dc:creator>
      <dc:date>2008-06-04T03:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157396#M111581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry for pumping this up, but have not found many more references related to this topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is RTH supposed to work with 'requiresNew' set to&amp;nbsp;false?&lt;/P&gt;&lt;P&gt;Been debugging code (repo 5.2.f), and when an&amp;nbsp;exception is thrown inside the for loop, it just quits it and does not retry,.. so, don't&amp;nbsp;understand &amp;nbsp;the utility of having this as a parameter, if it will never do as its name says (retry)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guess i'm taking something for granted, .. any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 08:20:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157396#M111581</guid>
      <dc:creator>iru</dc:creator>
      <dc:date>2017-05-25T08:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157397#M111582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With requiresNew set to false, the retrying transaction helper will look at the current transaction before creating a new transaction. If a transaction is already active no new (nested) transaction will be created. If the existing transaction is incompatible with the requested value of readOnly, an error will be thrown. E.g. if you request a read-write transaction and the current one is a read-only, it will fail. The other way around - a read-only within a read-write - will work though.&lt;/P&gt;&lt;P&gt;If no new transaction is created, the handler cannot apply retrying behaviour. It is assumed that the already active transaction will deal with any retrying semantics in that case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 09:54:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157397#M111582</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-05-26T09:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157398#M111583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Axel!&lt;/P&gt;&lt;P&gt;Got that clear from reading the source code of RTH, but if a class is called "Retry Transaction" I would assume that, no matter the parameters, it does what it says, say.. "retry the transaction".&lt;/P&gt;&lt;P&gt;However, the value of the parameter requiresNew, makes the transaction not to retry.&lt;/P&gt;&lt;P&gt;Maybe it's a matter of naming, but I would have expected it to be called "Transaction" and then have a parameter called "retry" (boolean), that if set to true, retries by creating a new transaction.&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 10:46:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157398#M111583</guid>
      <dc:creator>iru</dc:creator>
      <dc:date>2017-05-26T10:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157399#M111584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To some extent it makes sense. As you may know "naming things" is one of the hardest problems in IT. The problem with your example of a "Transaction" class with "retry" parameter set to true is that I may not want the helper to create a new transaction if I am already in one with retrying semantics, so I would somehow have to check the context I am in to determine if I can or cannot use it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 13:39:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157399#M111584</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-05-26T13:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: RetryingTransactionHelper learnings</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157400#M111585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you said "If no new transaction is created, the handler cannot apply retrying behavior".&lt;/P&gt;&lt;P&gt;Checking source code (5.2.f), this also applies, because when the #execute of the implementation fails with a Throwable, it's just rethrown, without retrying.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java#L509" title="https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/repo/transaction/RetryingTransactionHelper.java#L509" rel="nofollow noopener noreferrer"&gt;community-edition-old/RetryingTransactionHelper.java at master · Alfresco/community-edition-old · GitHub&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;So, they're both dependent tasks: retry requires new transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 08:06:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retryingtransactionhelper-learnings/m-p/157400#M111585</guid>
      <dc:creator>iru</dc:creator>
      <dc:date>2017-05-29T08:06:19Z</dc:date>
    </item>
  </channel>
</rss>

