Hi, Sent from my iPad
> On 27 déc. 2013, at 09:26, classical_89 <[email protected]> wrote: > > I'm new to ipojo and OSGi platform i not sure that my question is reasonable > ,so tell me if i wrong > I know that i can create an instance service using Configuration by : > > ConfigurationAdmin pm; > Configuration conf = pm.creatFactorConfiguration(type); > conf.update(props) > > so it will create an instance and instance's configuration will be store in > Configuration > (I can list Configuration to see it) > Now i want to creat another instance using XML metadata like: > <instance component="HelloComponent" name="HelloComponentInstance" > > <properties> > <property field="aFieldInHelloClass" value ="HELLO IPOJO"/> > </properties> > </instance> > > So ,i want when this instance is created ,it also has a configuration > information (may be aFieldInHelloClass ) store in Configuration > what can i do only with XML ? > You are creating an instance using an factory configuration. By using this way you are creating the instance and configuring it. Updating the configuration reconfigures the instance. For what you want you should use a regular configuration (not factory) and let your instance (declared in XML) be bound to this configuration. To do that follow the instructions from http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-userguide/describing-components/configuration-handler.html#exposing-a-managed-service Best regards, Clement > > > -- > View this message in context: > http://apache-felix.18485.x6.nabble.com/ipojo-create-instance-with-configuration-using-xml-tp5006611.html > Sent from the Apache Felix - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

