<?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: Java backed webscript just shut down... in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-webscript-just-shut-down/m-p/249765#M202895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By default the WebScript framework works in a transactional process, this means that for each execution of your Web Scripts the container will rollback all the nodes data if there will be returned any exception (RuntimeException).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So probably you will have in your log file an OutOfMemory error returned by the Java Virtual Machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to process many nodes probably you should disable the default transaction support of the Web Scripts engine and you could use the RetryingTransactionCallBack feature of Alfresco that allows you to use the transactionService in an explicit way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this way you can control the transactionService and you can decide when and what will be rollbacked by your WebScript without using all the memory available for the Java Virtual Machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest to try to disable the default transaction container of the WebScript setting to none the transaction element in the WebScript descriptor. Then I suggest to use the explicit transactionService as you can see in the FirstFoundationClient example that you can find in the Alfresco SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WebScripts Transactions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Description_Options" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Description_Options&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Java API - RetryingTransactionHelper:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Java_Foundation_API#Using_RetryingTransactionHelper" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Java_Foundation_API#Using_RetryingTransactionHelper&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 18:22:20 GMT</pubDate>
    <dc:creator>openpj</dc:creator>
    <dc:date>2011-06-27T18:22:20Z</dc:date>
    <item>
      <title>Java backed webscript just shut down...</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-webscript-just-shut-down/m-p/249764#M202894</link>
      <description>Hi to all of the members of this forum, this is my first post here. &lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;I'm developing a java backed webscript, on an Alfresco 3.3.4, which has to read some numerical properties from nodes, aggregate them using a certain set of rules, then outputs the results in a csv file.When I run the first tests o</description>
      <pubDate>Sat, 25 Jun 2011 14:16:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-webscript-just-shut-down/m-p/249764#M202894</guid>
      <dc:creator>documentalover</dc:creator>
      <dc:date>2011-06-25T14:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java backed webscript just shut down...</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-webscript-just-shut-down/m-p/249765#M202895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By default the WebScript framework works in a transactional process, this means that for each execution of your Web Scripts the container will rollback all the nodes data if there will be returned any exception (RuntimeException).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So probably you will have in your log file an OutOfMemory error returned by the Java Virtual Machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to process many nodes probably you should disable the default transaction support of the Web Scripts engine and you could use the RetryingTransactionCallBack feature of Alfresco that allows you to use the transactionService in an explicit way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this way you can control the transactionService and you can decide when and what will be rollbacked by your WebScript without using all the memory available for the Java Virtual Machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest to try to disable the default transaction container of the WebScript setting to none the transaction element in the WebScript descriptor. Then I suggest to use the explicit transactionService as you can see in the FirstFoundationClient example that you can find in the Alfresco SDK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WebScripts Transactions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Description_Options" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Description_Options&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Java API - RetryingTransactionHelper:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Java_Foundation_API#Using_RetryingTransactionHelper" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Java_Foundation_API#Using_RetryingTransactionHelper&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 18:22:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-webscript-just-shut-down/m-p/249765#M202895</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2011-06-27T18:22:20Z</dc:date>
    </item>
  </channel>
</rss>

