<?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: Transactions and read/write property in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188749#M141879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is no mutex or semaphore mechanism build in. Instead, Alfresco uses the optimistic locking feature of Hibernate to avoid this kind of errors. One transaction will receive an exception on commit to indicate that the data has changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be very helpful to have a counter or sequencing mechanism build into Alfresco, indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would like to avoid any concurrent updates, you would have to add some locking or recovering code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2009 14:48:18 GMT</pubDate>
    <dc:creator>lotharm</dc:creator>
    <dc:date>2009-01-20T14:48:18Z</dc:date>
    <item>
      <title>Transactions and read/write property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188748#M141878</link>
      <description>HiI have a scenario where nodeService.getProperty() and nodeService.setProperty() for the same property on the same node is executed inside a RetryingTransactionCallback:final RetryingTransactionHelper trxHelper = transactionService.getRetryingTransactionHelper();return trxHelper.doInTransaction(new</description>
      <pubDate>Tue, 20 Jan 2009 13:30:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188748#M141878</guid>
      <dc:creator>calle</dc:creator>
      <dc:date>2009-01-20T13:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions and read/write property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188749#M141879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is no mutex or semaphore mechanism build in. Instead, Alfresco uses the optimistic locking feature of Hibernate to avoid this kind of errors. One transaction will receive an exception on commit to indicate that the data has changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be very helpful to have a counter or sequencing mechanism build into Alfresco, indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would like to avoid any concurrent updates, you would have to add some locking or recovering code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 14:48:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188749#M141879</guid>
      <dc:creator>lotharm</dc:creator>
      <dc:date>2009-01-20T14:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions and read/write property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188750#M141880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;By that you mean that the optimistic locking feature of Hibernate will cause the transaction to throw an exception if the property value has changed when it is written? If I understand you correctly there is no exception thrown if the value is read by two threads simultaneously or written by one thread and read by anouther?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is easy to implement standard java synchronization to resolve this, as long as you are not running on a clustered system… I do not know how to solve the synchornization in that case. What I had hoped for was that some underlying service in Hibernate or Alfresco would handle it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 15:56:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188750#M141880</guid>
      <dc:creator>calle</dc:creator>
      <dc:date>2009-01-20T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions and read/write property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188751#M141881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The behaviour of your code will be dependent upon your database's isolation level.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think there is a fair chance that your code will work correctly, it's certainly worth you running some tests on your environment.&amp;nbsp;&amp;nbsp; The second transaction should retry after the concurrent update exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sequential indexing is always problematic in distributed systems, and for this reason it is best avoided if possible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2009 18:00:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188751#M141881</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2009-01-20T18:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transactions and read/write property</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188752#M141882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Records Management could be a use case. The file plan requires almost always the generation of some unique id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So a SequenceService may be a handy thing that could take of it at the database level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 19:19:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/transactions-and-read-write-property/m-p/188752#M141882</guid>
      <dc:creator>lotharm</dc:creator>
      <dc:date>2009-01-22T19:19:08Z</dc:date>
    </item>
  </channel>
</rss>

