[EMAIL PROTECTED] wrote on 06/20/2006 02:29:12 PM: > Hi, > > # I'm not sure if my questions should be posted on dev ml.
This is a fine question for this list. :-) > > The spec (r4.core.pdf) says "A Framework must return the key > in ServiceReference.getPropertyKeys in exactly the same case as it was last > set." > > I have questions on it. > > In advance, imagin that a Dictionary object with a key of "Service.Id" > and a value for it is specified at its service registration. According > the spec, framework must keep not the value specified but one that > framework sets for this key. Right. So the framework will do: properties.setProperty("service.id", newServiceId); thus overwritting the user specified "Service.Id" key during registerService. > > As far as I understand, ServiceReference.getPropertyKeys must return not > Constants.SERVICE_ID="service.id" but "Service.Id". No. You have it reversed. The last key set was done by the framework during the processing of registerService and it used the value of Constants.SERVICE_ID. The last set was done by the framework and not by the user. The spec states that these keys will be overwritten by the framework when registering a service. > > # The same thing can be said about OBJECTCLASS. Yes. Since the framework sets the Constants.OBJECTCLASS key last, the case of that key will be the case in Constants. > > Q1. Is my understanding correct ? No. See above. > > Q2. Why did OSGi Alliance decide the spec as "A Framework must return > the key in ServiceReference.getPropertyKeys in exactly the same case as > it was last set." ? (why not decided as "return keys in lower case", at > least for Constants.*** keys) The service properties are case-preserving with case-insensitive lookup. In hindsight, the expert group regrets that decision. We should have gone case-sensitive. But it is too late to change now without risking breaking backwards compatibility. As we have created and will create new specification we have chosen and will choose case-sensitive where possible. > > --------------------- > NTT Cyber Solutions Laboratories > > Ikuo YAMASAKI > E-mail: [EMAIL PROTECTED] > > > _______________________________________________ > osgi-dev mailing list > osgi-dev@bundles.osgi.org > http://bundles.osgi.org/mailman/listinfo/osgi-dev BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [EMAIL PROTECTED] Office: +1 407 849 9117 Mobile: +1 386 848 3788 _______________________________________________ osgi-dev mailing list osgi-dev@bundles.osgi.org http://bundles.osgi.org/mailman/listinfo/osgi-dev