There is no replacement for this method.  OSGi decided not to provide a replacement for this convenience method in the new wiring API.  Instead you have to iterate over the list of installed bundles your self to find the bundles you are looking for.  As an aside, Equinox is not going to remove the implementation of PackageAdmin anytime soon.  Also note that the implementation of PackageAdmin.getBundles(String, String) is optimized in Equinox to hash on the BSN value.  So if you write your own code to do the same thing you could see a slowdown in performance if you are calling this method many times.

Tom

[email protected] wrote: -----

To: [email protected]
From: Gunnar Wagenknecht <[email protected]>
Sent by: [email protected]
Date: 02/22/2011 06:05AM
Subject: [equinox-dev] Replacement for PackageAdmin.getBundles

Hi,

What's the recommended replacement for
org.osgi.service.packageadmin.PackageAdmin.getBundles(String, String)? I
was looking for a similar method in the new org.osgi.framework.wiring
package. But it appears that there is none. I haven't checked the
changes for M6, though.

-Gunnar



--
Gunnar Wagenknecht
[email protected]
http://wagenknecht.org/

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to