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

Karl Pauls commented on FELIX-5507:
-----------------------------------

Again, I'm not sure I understand all the implications but it sounds to me like 
you want to have your cake and eat it too. 

Either SCR uses its own bundle context (whichever that is in the case of a 
"subsystem" - maybe the system bundle context) to look up the CM and register 
listeners with or it uses the bundle context of the extended bundle. 

In the former case, SCR has no problems with class loading and it just so 
happens that a bundle extended by SCR will get the configurations from the CM 
visible to the SCR. 

In the latter case, the bundle will get the configurations from the CM visible 
to the bundle but the SCR must deal with the possibility that the bundle might 
not be wired to the same CM the SCR can see. 

To basically say we want the CM visible to the bundle but we just assume it is 
the one the SCR can see as well sounds like an unnecessary complication to me. 
If that is the assumption anyways you might as well just make that explicit and 
use the SCR bundle context to begin with no? 

Again, feel free to ignore me as I likely just don't have all the info.

> 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 admin.
> 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
(v6.3.15#6346)

Reply via email to