Question

I'm using Declarative Services and facing the following problem. I want to register my component with properties like using

bc.registerService(MyClass.class.getName(), this, props);

However, with Declarative Services I have to provide a XML file defining these properties. Now, the problem is that I do not have string compatible values as property values (the keys are strings). The properties are not any kind of numbers or stings but rather objects returned by a "create" method. This was not a problem with

bc.registerService(MyClass.class.getName(), this, props);

because props can contain entries. But how can I manage this with Declarative Services?

BR Ewgenij

Was it helpful?

Solution

I also asked the question on OSGI mailing lists, it was answered here http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg02898.html

BR Ewgenij

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top