<?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: custom behaviour class/object implementation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265737#M218867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have any insight into this???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I monitor the logs, it seems like multiple threads are using the same object somehow?&amp;nbsp; That should not be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Furthermore, a synchronized block is basically blocking execution and for whatever reason, never completes.&amp;nbsp; The first thread seems to enter the synchronized block fine, but the first thing it does (after logging that it's in the block) is use the nodeService (private object) and it doesn't seem to ever get that far - or that's where it stops.&amp;nbsp; The nodeService apparently is being blocked by the second thread?&amp;nbsp; So eventually, the second thread "catches up" and gets to the synchronized block and can not enter.&amp;nbsp; Since the first thread is blocked trying to use the nodeService (I think), it all comes to a screeching halt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am testing by uploading two files at a time.&amp;nbsp; It always blocks in the same place.&amp;nbsp; If I upload one file at a time, it works consistently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone could tell me how these objects are instantiated per-thread, per-node, or whatever, I could maybe figure out what Alfresco is trying to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 19:32:49 GMT</pubDate>
    <dc:creator>aweber1nj</dc:creator>
    <dc:date>2012-07-16T19:32:49Z</dc:date>
    <item>
      <title>custom behaviour class/object implementation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265736#M218866</link>
      <description>From what I can tell, my custom behavior class gets instantiated only once, and that same java object is then re-used across all the calls for all the nodes I've tested with (whether it re-runs on the same node, or whether it's an entirely different node).I'm curious as to how this would scale, and</description>
      <pubDate>Fri, 13 Jul 2012 03:39:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265736#M218866</guid>
      <dc:creator>aweber1nj</dc:creator>
      <dc:date>2012-07-13T03:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: custom behaviour class/object implementation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265737#M218867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have any insight into this???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I monitor the logs, it seems like multiple threads are using the same object somehow?&amp;nbsp; That should not be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Furthermore, a synchronized block is basically blocking execution and for whatever reason, never completes.&amp;nbsp; The first thread seems to enter the synchronized block fine, but the first thing it does (after logging that it's in the block) is use the nodeService (private object) and it doesn't seem to ever get that far - or that's where it stops.&amp;nbsp; The nodeService apparently is being blocked by the second thread?&amp;nbsp; So eventually, the second thread "catches up" and gets to the synchronized block and can not enter.&amp;nbsp; Since the first thread is blocked trying to use the nodeService (I think), it all comes to a screeching halt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am testing by uploading two files at a time.&amp;nbsp; It always blocks in the same place.&amp;nbsp; If I upload one file at a time, it works consistently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone could tell me how these objects are instantiated per-thread, per-node, or whatever, I could maybe figure out what Alfresco is trying to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 19:32:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265737#M218867</guid>
      <dc:creator>aweber1nj</dc:creator>
      <dc:date>2012-07-16T19:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: custom behaviour class/object implementation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265738#M218868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking further, it may be that I need to leverage the RetryingTransactionInterceptor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like this can be leveraged using declaritive properties in the bean definition?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any examples – maybe they have done this in the past – of using the TransactionService to specify that your on… behavior methods should be transactional (Read/Write)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: I tried some semblance of using a transaction (from one of the wiki pages), and it didn't help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Part of the stack trace is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;org.springframework.dao.ConcurrencyFailureException: Failed to update node 1929; nested exception is org.springframework.dao.DeadlockLoserDataAccessException: &lt;BR /&gt;### Error updating database.&amp;nbsp; Cause: org.postgresql.util.PSQLException: ERROR: deadlock detected&lt;BR /&gt;&amp;nbsp; Detail: Process 2804 waits for ShareLock on transaction 321827; blocked by process 2432.&lt;BR /&gt;Process 2432 waits for ExclusiveLock on tuple (144,34) of relation 16582 of database 16386; blocked by process 2804.&lt;BR /&gt;&amp;nbsp; Hint: See server log for query details.&lt;BR /&gt;### The error may involve alfresco.node.update_Node-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### Cause: org.postgresql.util.PSQLException: ERROR: deadlock detected&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Appreciate it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-AJ&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 20:37:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-behaviour-class-object-implementation/m-p/265738#M218868</guid>
      <dc:creator>aweber1nj</dc:creator>
      <dc:date>2012-07-16T20:37:27Z</dc:date>
    </item>
  </channel>
</rss>

