felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5507) ConfigurationAdmin might not be visible to SCR implementation
Date Wed, 15 Feb 2017 12:54:41 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867778#comment-15867778

Karl Pauls commented on FELIX-5507:

Granted, I don't know too much about how the code looks but it sounds like it shouldn't be
too hard to Proxy the Configadmin with a dynamic proxy. Basically, you'd have to wrap the
service lookup with something that does an instanceof and if that fails wrap the result in
a dynamic proxy that just delegates all calls and wraps all results of type Configuration
in yet another dynamic proxy that does delegation only. That way you at least wouldn't have
to introduce reflection any place else...

> ConfigurationAdmin might not be visible to SCR implementation
> -------------------------------------------------------------
>                 Key: FELIX-5507
>                 URL: https://issues.apache.org/jira/browse/FELIX-5507
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.0.8
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: scr-2.1.0
> We have one case where the extended bundles do not see the configuration admin service.
Interestingly the same application runs fine everywhere else, but just on a special environment
(windows, ibm java inside Websphere) we have this problem reproducibly.
> Using the system bundle context instead of the bundle context of the extended bundle
in ConfigAdminTracker solves the problem.
> Interestingly only the bundles started last (2 out of probably 80) see the configuration
> It could also be that a faulty service hook is involved, although I'm not yet aware of
such a hook
> Update: after some discussion, some issues in the framework have been identified, but
also the SCR implementation is not 100% correct: as it is using the bundle context of the
extended bundle, it might get a configuration admin which interface is not visible to SCR.
Therefore it should revert to reflection to access the configuration admin.

This message was sent by Atlassian JIRA

View raw message