Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Declarative services: how to set a property?
Declarative services: how to set a property? [message #69613] Tue, 11 July 2006 14:42 Go to next message
Sergey Mylnikov is currently offline Sergey MylnikovFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,

in OSGI Service Compendium in Declarative Services section on page
282-432 I have found the following component.xml example:

<?xml version="1.0" encoding="UTF-8"?>
<component name="example.handler">
<implementation class="com.acme.HandlerImpl"/>
<property name="event.topics" value="some/topic"/>
<service>
<provide interface=
"org.osgi.service.event.EventHandler"/>
</service>
<component>

as far as I understand here the property "event.topics" is set to
"some/topic". I have tried to set the property for my service in the
similar manner but it does not work.

But if I register my service the "usual" way. For example, like this:

IHandler impl = new HandlerImpl();
Hashtable properties = new Hashtable(1);
properties.put("type", "normal");
reg = context.registerService(IHandler.class.getName(), impl,
properties);

Then the property gets set. Am I doing something wrong?

best regards,
Sergey Mylnikov
Re: Declarative services: how to set a property? [message #69996 is a reply to message #69613] Thu, 13 July 2006 21:57 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Hi Sergey,

Please open a bug report against Equinox->Bundles with an example to
reproduce.

Thanks.

Tom.
Previous Topic:http service port
Next Topic:Difference between Bundles and Management Bundles
Goto Forum:
  


Current Time: Thu Sep 26 01:30:42 GMT 2024

Powered by FUDForum. Page generated in 0.04045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top