You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2015/06/16 10:27:01 UTC

[jira] [Commented] (SLING-4811) Handle OSGi event in a separate thread to prevent being blacklisted by the OSGi Event Admin

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

Konrad Windszus commented on SLING-4811:
----------------------------------------

There are three different options on how to execute the potentially long-running handler
# using the {{ThreadPoolManager}} to use a thread from the pool to process the event
# using Sling Events
# just using {{Thread.start}} 

IMHO 1. is the best option because it prevents too many threads in parallel from being created (as opposed to 3.) and also does not come with too much overhead like Sling Jobs (which would also by default process the event only on one instance in a cluster).
Any other opinions?

> Handle OSGi event in a separate thread to prevent being blacklisted by the OSGi Event Admin
> -------------------------------------------------------------------------------------------
>
>                 Key: SLING-4811
>                 URL: https://issues.apache.org/jira/browse/SLING-4811
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: i18n 2.4.2
>            Reporter: Konrad Windszus
>
> Since Apache Felix blacklists all OSGi Event Handlers which take too long to complete it would be good if all long-running tasks would be executed in a separate thread (like preloading resource bundles).
> Otherwise the {{JcrResourceBundleProvider}} might get blacklisted if the instance is under load and in the future is not notified about any changes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)