Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Config admin and metatype services
Config admin and metatype services [message #103321] Fri, 04 January 2008 12:01
Jaime is currently offline JaimeFriend
Messages: 56
Registered: July 2009
Member
Hi all,

Does anyone know how both services (config admin and metatype services) work
together?

I've created the following METADATA.XML file:
<?xml version="1.0" encoding="UTF-8"?>
<MetaData xmlns="http://www.osgi.org/xmlns/metatype/v1.0.0">
<OCD name="serialConfig" id="serialConfig" description="Config of serial
device">
<AD name="Port" id="port" type="Integer" default="12345" />
<AD name="Product" id="product" type="String" default="device" />
<AD name="Baud" id="baud" type="Integer" default="9600" />
</OCD>
<Designate pid="com.acme.serialport.device">
<Object ocdref="serialConfig" bundle="*">
<Attribute adref="port" content="12345"/>
<Attribute adref="product" content="device"/>
<Attribute adref="baud" content="9600"/>
</Object>
</Designate>
</MetaData>

I've implemented and registered the ManagedService interface with the pid:
"com.acme.serialport.device". However, when the update method is called, the
configuration (Dictionary type) is null. I thought that it should pass the
configuration object defined in the Designate XML element of the
METADATA.XML.
Moreover, I can read the OCD and AD elements with the MetatypeService, but I
cannot access to the Designate object. What's the purpose of this designate
element if it's not used as a default value for the config admin service?

Another additional question. If I start equinox with the argument: "-init",
don't you think that the configuration stored by the Config Admin service
should be removed?

Thanks in advance,
Jaime
Previous Topic:Problem Integrating OSGi, Jetty 6, and Glassfish Jasper
Next Topic:trusted bundles
Goto Forum:
  


Current Time: Wed Apr 24 15:36:29 GMT 2024

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

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

Back to the top