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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -