<?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: Authentication within a Job in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301657#M254787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had assumed 'ApplicationContextHelper.getApplicationContext().getBean(ServiceRegistry.SERVICE_REGISTRY)' would follow the singleton pattern, but it doesn't, and getApplicationContext() was instead causing the duplicate instance of Alfresco to be instantiated.&amp;nbsp; Injecting the existing ServiceRegistry instance via a &amp;amp;lt;ref bean="ServiceRegistry" /&amp;amp;gt; solved the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And coding projects against a standard interface such as the JCR API's when possible, as opposed to the proprietary Alfresco Foundation API's, attempts to avoid vendor lock-in - both in terms of the implementation runtime and the knowledge required to maintain the resulting 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>Fri, 19 Apr 2013 22:05:20 GMT</pubDate>
    <dc:creator>hubick</dc:creator>
    <dc:date>2013-04-19T22:05:20Z</dc:date>
    <item>
      <title>Authentication within a Job</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301655#M254785</link>
      <description>Hi,I have an a org.quartz.Job subclass for creating folders within my repository (v3.3.5).I have been using only the JCR API up until recently, but now I also wish to populate content rules on the created folders, so I mixed in some native Alfresco API calls to create those.Despite having wrapped my</description>
      <pubDate>Thu, 18 Apr 2013 21:04:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301655#M254785</guid>
      <dc:creator>hubick</dc:creator>
      <dc:date>2013-04-18T21:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication within a Job</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301656#M254786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;why did you use JCR API in a job that runs in Alfresco? Just out of curiosity…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you invoke Alfresco services from a Quarts job, you not only need to wrap your calls in a proper authentication context via runAs, but also in a proper transaction context (e.g. via RetryingTransactionHelper), which I see is lacking from your thread dump. Or is this contained in the part that you have snipped?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 08:11:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301656#M254786</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-04-19T08:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication within a Job</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301657#M254787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had assumed 'ApplicationContextHelper.getApplicationContext().getBean(ServiceRegistry.SERVICE_REGISTRY)' would follow the singleton pattern, but it doesn't, and getApplicationContext() was instead causing the duplicate instance of Alfresco to be instantiated.&amp;nbsp; Injecting the existing ServiceRegistry instance via a &amp;amp;lt;ref bean="ServiceRegistry" /&amp;amp;gt; solved the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And coding projects against a standard interface such as the JCR API's when possible, as opposed to the proprietary Alfresco Foundation API's, attempts to avoid vendor lock-in - both in terms of the implementation runtime and the knowledge required to maintain the resulting 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>Fri, 19 Apr 2013 22:05:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/authentication-within-a-job/m-p/301657#M254787</guid>
      <dc:creator>hubick</dc:creator>
      <dc:date>2013-04-19T22:05:20Z</dc:date>
    </item>
  </channel>
</rss>

