More detail is needed. Where "within a ServiceTracker" are you putting this? If it is in addingService, then you will only ever get one service object per service, so the change doesn't really do anything. And you would also have to pair this with a change to removedService to release the service through the ServiceObjects object.
If the point is that if multiple trackers for a service are opened within a bundle, then, yes, each such tracker could obtain a different service object for prototype scope services. -- BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [email protected] office: +1 386 848 1781 mobile: +1 386 848 3788 From: Raymond Auge <[email protected]> To: OSGi Developer Mail List <[email protected]> Date: 2014/10/17 15:16 Subject: [osgi-dev] prototype scope and service trackers Sent by: [email protected] Is it fair to say that, within a ServiceTracker I can safely replace: S s = bundle.getService(servlceReference); with ServiceObjects<S> so = bundle.getServiceObjects(serviceReference); S s = so.getService(); which would mean that only where a bundle implemented more than one such tracker could the bundle ever get more than one instance! Correct? -- Raymond Augé (@rotty3000) Senior Software Architect Liferay, Inc. (@Liferay) _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
