<?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 Web Scripts Multithread in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268168#M221298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://static.springsource.org/spring/docs/1.2.x/reference/beans.html" rel="nofollow noopener noreferrer"&gt;http://static.springsource.org/spring/docs/1.2.x/reference/beans.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you declare a spring bean as not a singleton then for each invocation a new instance is created and destroyed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I doubt that this is ever required for a web script.&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are considering using it,&amp;nbsp; I suggest you think again.&amp;nbsp; Or post your use-case so we can debate. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2011 13:24:47 GMT</pubDate>
    <dc:creator>mrogers</dc:creator>
    <dc:date>2011-05-24T13:24:47Z</dc:date>
    <item>
      <title>Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268165#M221295</link>
      <description>Hello,I have a Java-backed Web Script (like this example: http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#SimpleWebScript.java)Are java webscripts already prepared for multithreading?Or I have to put something in the &amp;lt;bean&amp;gt; configuration? Or I have to program the java class for m</description>
      <pubDate>Tue, 24 May 2011 10:37:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268165#M221295</guid>
      <dc:creator>isloat</dc:creator>
      <dc:date>2011-05-24T10:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268166#M221296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By default Webscripts are declared as singletons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need for a single request a new instance of the WebScript you have to declare the attribute singleton="false" in the Spring bean definition. But I never tried to use a prototype for a WebScript, I don't know if there are some issues for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 10:42:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268166#M221296</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2011-05-24T10:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268167#M221297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But I think that even declaring this attribute, if the object that creates webscripts is a Singleton, and only creates the webscript once at the begining (not one for each request), and then uses the same object, this attribute will be useless. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I right? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's a fast reply! Thanks so much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 10:56:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268167#M221297</guid>
      <dc:creator>isloat</dc:creator>
      <dc:date>2011-05-24T10:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268168#M221298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://static.springsource.org/spring/docs/1.2.x/reference/beans.html" rel="nofollow noopener noreferrer"&gt;http://static.springsource.org/spring/docs/1.2.x/reference/beans.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you declare a spring bean as not a singleton then for each invocation a new instance is created and destroyed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I doubt that this is ever required for a web script.&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are considering using it,&amp;nbsp; I suggest you think again.&amp;nbsp; Or post your use-case so we can debate. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 13:24:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268168#M221298</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2011-05-24T13:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268169#M221299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My use case is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1- Obtain a document (using the object ServiceRegistry.getContentService.getContentReader)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2- Using the document's data, create another document in the same folder as the original one&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3- Save new data in the document created (using ServiceRegistry.getContentService.getContentWriter)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm interested in multithreading because I don't know if these Alfresco Interfaces (ServiceRegistry, ContentService, ContentReader and ContentWriter) are ready for it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 14:53:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268169#M221299</guid>
      <dc:creator>isloat</dc:creator>
      <dc:date>2011-05-24T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Java-backed Web Scripts Multithread</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268170#M221300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have no class level "state" in the above use-case, so thread safety is not an issue.&amp;nbsp;&amp;nbsp;&amp;nbsp; The interfaces you are calling are all "thread safe" there will not be a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However as an asside I'd avoid using the ServiceRegistry, there's no need for it if you inject your dependencies.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 15:43:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/java-backed-web-scripts-multithread/m-p/268170#M221300</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2011-05-24T15:43:10Z</dc:date>
    </item>
  </channel>
</rss>

