felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3154) "felix.systembundle.activators" list : there is a change in config map form felix v3 to felix v4
Date Tue, 11 Oct 2011 19:49:12 GMT

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

Richard S. Hall commented on FELIX-3154:
----------------------------------------

In reality, I was actually surprised to learn about this too when it was first reported after
the framework 4.0 release. I didn't realize earlier since internally the framework still uses
a raw type, I believe. Had I been paying more close attention to this specific detail during
the R4.3 spec writing process, I probably would have argued for Map<String, Object>
instead of Map<String, String>, but it didn't really dawn on me.

At this point, the only thing that could be done is to add another method to FrameworkFactory
in a future release, but I'm not convinced it is worth it. You really can mimic this behavior
with the existing API, so you could probably write a utility class to do it. For example,
create a utility class that accepts a list of activators, a config map, and a framework factory.
It could then just do the following:

1. Create a framework instance with the supplied config map.
2. Call Framework.init().
3. Register synchronous bundle listener to listen for system bundle STOPPING.
4. Call start() on each activator in the passed in list with Framework.getBundleContext().
5. Call Framework.start().

Then, when a system bundle STOPPING event is received by the above synchronous listener, simply
call stop() on each listener with the system bundle context. Something like that is basically
identical and doesn't rely on any containerisms.
                
> "felix.systembundle.activators" list : there is a change in config map form felix v3
to felix v4
> ------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3154
>                 URL: https://issues.apache.org/jira/browse/FELIX-3154
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.0
>            Reporter: Andrei Pozolotin
>
> there is a change in config map form felix v3 to felix v4
> Map<String, Object>
> http://www.osgi.org/javadoc/r4v42/org/osgi/framework/launch/FrameworkFactory.html
> Map<String, String>
> http://www.osgi.org/javadoc/r4v43/org/osgi/framework/launch/FrameworkFactory.html
> short of raw type hack in; what is the correct way to provide
> "felix.systembundle.activators" list ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message