<?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: Cron event handler - synchronous or asynchronous in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319669#M6670</link>
    <description>&lt;P&gt;Actually - I have a follow-up question&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 13:35:37 GMT</pubDate>
    <dc:creator>Eric_Ace</dc:creator>
    <dc:date>2017-03-15T13:35:37Z</dc:date>
    <item>
      <title>Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319666#M6667</link>
      <description>&lt;P&gt;Hello - I have created an event handler for a scheduled event. The handler will perform a long-running operation. Looking through the Nuxeo code, I see various classes implementing AbstractWork for background processing. My question is: should I consider using the AbstractWork code? Or -- will the event already be running on it's own thread by virtue of the fact that it was invoked according to a schedule?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:10:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319666#M6667</guid>
      <dc:creator>Eric_Ace</dc:creator>
      <dc:date>2017-03-15T13:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319667#M6668</link>
      <description>&lt;P&gt;A scheduled event should be managed by an asynchronous listener.&lt;/P&gt;
&lt;P&gt;If you use a synchronous listener, it will execute in the thread of the Quartz process dealing with the scheduling of that event, and such threads are on purpose kept in very small numbers (to avoid consuming unneeded resources —&amp;nbsp;there's actually just one thread in the default platform, see &lt;CODE&gt;templates/common/config/quartz.properties&lt;/CODE&gt;). If you write such a synchronous listener for a scheduled event then it should execute very quickly, but if it needs to it can also do asynchronous Work by passing a subclass of &lt;CODE&gt;AbstractWork&lt;/CODE&gt; to the &lt;CODE&gt;WorkManager&lt;/CODE&gt; method &lt;CODE&gt;schedule&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;But directly writing an asynchronous listener (which is implemented using a subclass of &lt;CODE&gt;AbstractWork&lt;/CODE&gt; itself) is simpler.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:22:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319667#M6668</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2017-03-15T13:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319668#M6669</link>
      <description>&lt;P&gt;Awesome. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:25:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319668#M6669</guid>
      <dc:creator>Eric_Ace</dc:creator>
      <dc:date>2017-03-15T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319669#M6670</link>
      <description>&lt;P&gt;Actually - I have a follow-up question&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:35:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319669#M6670</guid>
      <dc:creator>Eric_Ace</dc:creator>
      <dc:date>2017-03-15T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319670#M6671</link>
      <description>&lt;P&gt;&lt;CODE&gt;org.nuxeo.ecm.core.scheduler.TestSchedulerService.testScheduleRegistration&lt;/CODE&gt; is one such test.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:42:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319670#M6671</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2017-03-15T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319671#M6672</link>
      <description>&lt;P&gt;Thanks again. The code contains the following reference&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:03:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319671#M6672</guid>
      <dc:creator>Eric_Ace</dc:creator>
      <dc:date>2017-03-15T16:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319672#M6673</link>
      <description>&lt;P&gt;This file is &lt;CODE&gt;nuxeo-core/nuxeo-core-event/src/test/resources/OSGI-INF/test-scheduler-config.xml&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:21:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319672#M6673</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2017-03-15T16:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cron event handler - synchronous or asynchronous</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319673#M6674</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 18:22:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/cron-event-handler-synchronous-or-asynchronous/m-p/319673#M6674</guid>
      <dc:creator>Eric_Ace</dc:creator>
      <dc:date>2017-03-15T18:22:42Z</dc:date>
    </item>
  </channel>
</rss>

