java - How to get rid of OSGi bundle's properties that are not exist in their corresponding configuration ("service.pid", etc.)? -


i have class similar following:

@component(configurationpid = "foo.bar", configurationpolicy = configurationpolicy.require) public class myclass {      @activate     public void activate(map<string, object> properties) throws exception {         (string property : properties.keyset()) {             if (!isvalidproperty(property)) {                 throw new illegalargumentexception("unknown property: " + property);             }             ...         }     }  } 

the properties map must contain properties corresponding configuration source (e.g. file provided user). , is, contains properties not exist (service.pid, felix.fileinstall.dir, etc.), program broken. want rid of them somehow.
tried use configurationadmin.getconfiguration.getproperties , blueprint cm-properties gives same effect.
can't hardcode names of properties exclude, because don't know are.
there means tell osgi runtime not put them @ in map?
i'm doing using servicemix's osgi support (which karaf, felix, , aries).

currently there no way exclude these artificial properties agree pretty bad.

you can open issue , apache felix project jira.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -