You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2014/10/22 23:14:33 UTC

[jira] [Updated] (SLING-4026) Adapter Factory Race Condition

     [ https://issues.apache.org/jira/browse/SLING-4026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Edelson updated SLING-4026:
----------------------------------
    Affects Version/s:     (was: Sling Models Implementation 1.1.0)
                       Adapter 2.1.2
              Summary: Adapter Factory Race Condition  (was: Sling Models Race Condition)

Updated description/version to reflect that this is a general Adapter Manager issue - is not related to Sling Models specifically.

> Adapter Factory Race Condition
> ------------------------------
>
>                 Key: SLING-4026
>                 URL: https://issues.apache.org/jira/browse/SLING-4026
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Adapter 2.1.2
>            Reporter: JBodkin
>              Labels: models
>         Attachments: racer.zip
>
>
> During initialization of a bundle, it is possible to encounter a race condition in which the BundleTrackerCustomizer::addingBundle(Bundle bundle, BundleEvent event) is triggered after the bundle has begun initialization of a immediate component.
> {code:java}
> @Component(immediate = true)
> @Service
> public class ExampleImpl {
>     @Activate
>     public void activate(ComponentContext context) {
>         Resource resource = ....
>         // Race condition possible here... Could be executed before the BundleTracker (ModelPackageBundleListener)
>         SlingModelExample example = resource.adaptTo(SlingModelExample);
>     }
> }
> {code}



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