<?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: ByteArrayEntity: improve encapsulation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130593#M91772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 May 2013 08:40:20 GMT</pubDate>
    <dc:creator>marcus1</dc:creator>
    <dc:date>2013-05-25T08:40:20Z</dc:date>
    <item>
      <title>ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130590#M91769</link>
      <description>I've run into a nasty bug in a custom variable type causing Foreign Key Constaint error in ACT_FK_VAR_BYTEARRAY.The first part of solving the problem was to improve logging in DbSqlSession. This helped me diagnose what went wrong. These changes you can find in this pull request:https://github.com/Ac</description>
      <pubDate>Mon, 13 May 2013 15:00:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130590#M91769</guid>
      <dc:creator>marcus1</dc:creator>
      <dc:date>2013-05-13T15:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130591#M91770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This issue causes some more trouble. Due to updates of these byte array ids, we run into race conditions. During an update of a value we find time slots where we get an id which is not valid anymore. These leads to NullPointerExceptions… &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; But, we do not have a custom implementation, we just use the normal Activiti API and call getVariables() to HistoryService and RuntimeService quite frequently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue is also responsible for the ticket I created: &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1687" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1687&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The handling of byte arrays and serializables need to be changed, in my opinion. The method setByteArrayValue mentioned above should be changed in the following way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Check for existence of a former value. If there is one, perform an update in the database if the value to be set is not null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) If a former value exists, but the new value is null, perform a delete.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) If no value exists and the new value is not null, perform an insert.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) No former value and new value is null, do nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe, even a null value should be put into ACT_GE_BYTEARRAY table. So each serializable variable get a single, constant id.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 11:59:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130591#M91770</guid>
      <dc:creator>rrludwig</dc:creator>
      <dc:date>2013-05-22T11:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130592#M91771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Marcus: I agree with what you are writing. If you create a pull request, we can continue the discussion there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@rrludwig: thanks for reporting the issue. We will look into it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it sounds strange that this race condition occurs. Shouldn't transaction prevent this problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 15:53:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130592#M91771</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-23T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130593#M91772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 May 2013 08:40:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130593#M91772</guid>
      <dc:creator>marcus1</dc:creator>
      <dc:date>2013-05-25T08:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130594#M91773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can follow my progresss here if you want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/marcusk24/Activiti/commits/master" rel="nofollow noopener noreferrer"&gt;https://github.com/marcusk24/Activiti/commits/master&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are quite a number of changes, but I've tried to group the commits into understandable bite-size chunks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is already funtional. However, I still want to clean up the duplicate code in the classes that deal with ByteArrayEntities. I'll probably get to this tomorrow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2013 08:19:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130594#M91773</guid>
      <dc:creator>marcus1</dc:creator>
      <dc:date>2013-05-27T08:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130595#M91774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Done: &lt;/SPAN&gt;&lt;A href="https://github.com/Activiti/Activiti/pull/83" rel="nofollow noopener noreferrer"&gt;https://github.com/Activiti/Activiti/pull/83&lt;/A&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 09:28:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130595#M91774</guid>
      <dc:creator>marcus1</dc:creator>
      <dc:date>2013-06-09T09:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: ByteArrayEntity: improve encapsulation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130596#M91775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your contribution, we're looking into it to get it reviewed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 15:01:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/bytearrayentity-improve-encapsulation/m-p/130596#M91775</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-06-10T15:01:17Z</dc:date>
    </item>
  </channel>
</rss>

