Skip to main content



      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 10:42 Go to next message
Eclipse UserFriend
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 17:57 Go to previous message
Eclipse UserFriend
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: Sat May 31 04:49:10 EDT 2025

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

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

Back to the top