Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Replacement for PackageAdmin.getBundles

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

-----equinox-dev-bounces@xxxxxxxxxxx wrote: -----

To: equinox-dev@xxxxxxxxxxx
From: Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
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
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Back to the top