Hi Felix,

On Mon, 17 Aug 2009 13:01:01 +0200
Felix Meschberger <[email protected]> wrote:

Felix> Hi all,
Felix> 
Felix> Ikuo Yamasaki schrieb:
Felix> > Hi all,
Felix> > 
Felix> > I'm now imlementing CT of OSGi-A R4.2 for CM.
Felix> > 
Felix> > Please assume that:
Felix> > 
Felix> > 1. Conf1 with pid1 and locationA is created.
Felix> > 2. BundleA whose location is locationA registers a ManagedService
Felix> > service with the pid1.
Felix> > ==> the service (updated method) will be called back with null prop.
Felix> > 3. Now, which should happen if setBundleLocation(null) of Conf1 is
Felix> > called ?
Felix> > 
Felix> > Choice A: the service is called back again and the location of Conf1 is
Felix> >        dynamically set to locationA, because Conf1 is explicitly set as
Felix> >        "dynamic binding conf" and there exists the target bundle,
Felix> >        BundleA. (Just as if the ManagedService got registered at the
Felix> >        momement.)
Felix> > 
Felix> > 
Felix> > Choise B: Nothing happens.
Felix> > 
Felix> > IMO, Choice A. In addition, the spec should be clarified on this point
Felix> > in the future. (I don't mean, R4.2 cmpn spec should be fixed because it
Felix> > is too late.)
Felix> > 
Felix> > # Current RI(Apache Felix impl) does as Choice B.
Felix> > 
Felix> > What do you think ?
Felix> 
Felix> How about Option C: The configuration binding remains bound to locationA
Felix> but the binding is converted into a dynamic binding which is removed
Felix> when bundleA is uninstalled.

That seems better !

Felix> If going for Option A: Should then also be an CM_UPDATED event be fired ?

Right, that is to be considered...

Either of Option A and B, current spec seems unclear.

Felix> Plus: What happens if in step 3 setBundleLocation(locationB) (not A!) is
Felix> called ? This should actually take the configuration away from BundleA,
Felix> right ?

Although I didn't think about it, right. The configuration should be
unbound from bundle A and be bound to the bundle B.
That means, updated(null) of ManagedService registered by bundle A will
be called back. If there exists ManagedService registered by bundleB,
updated(prop) is called back.

Regards,

---------------------
NTT Cyber Solutions Laboratories

     Ikuo YAMASAKI
        E-mail: [email protected]
TEL +81-46-859-8537  FAX +81-46-855-1282 


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to