[ 
https://issues.apache.org/jira/browse/SLING-10384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748701#comment-17748701
 ] 

Roy Teeuwen commented on SLING-10384:
-------------------------------------

[~marett] [~joerghoh]  I'm working for one of those customers, who has the need 
to do post actions after a distribution action has occurred. The current 
implementation makes it very hard:
 * It's a singleton, so I can't add my own ImportPostProcessor
 * The event is removed, so I can't listen on that either

Is there a reason why this is implemented this way? If I look at the existing 
implementation we already have (in an implementation based on AEM 6.5), we 
could use the Preprocessor interface to execute for example 
DispatcherFlushRules like provided in acs-aem-commons

I also see there is an InvalidationPostProcessor, not sure what is the 
difference, but it is also a singleton instead of a factory

> Execute actions before sending "o/a/s/d/i/package/imported" event
> -----------------------------------------------------------------
>
>                 Key: SLING-10384
>                 URL: https://issues.apache.org/jira/browse/SLING-10384
>             Project: Sling
>          Issue Type: New Feature
>          Components: Content Distribution
>    Affects Versions: Content Distribution Journal Core 0.1.16
>            Reporter: Joerg Hoh
>            Assignee: Joerg Hoh
>            Priority: Major
>             Fix For: Content Distribution Journal Core 0.1.18, Content 
> Distribution API 0.5.0
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> After the package has been imported and before the event 
> "org/apache/sling/distribution/importer/package/imported" event is sent, 
> custom functionality should be executed synchronously. It should have access 
> to the same type of information which is sent with the event.
> This allows to execute actions which before any handlers of the "imported" 
> event.
> On the implementation side we will do a {{eventadmin.sendEvent()}} and add 
> the same payload as with the "package/imported" event, but under the topic 
> {{o/a/s/d/i/package/committed}} . This will allow the synchronous executions 
> of event handlers.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to