[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] BundleContext and getName

I too am in favour of keeping the interfaces simple but there is a subtle point about function in question.  In the context of possible multiple version support, there may be several bundles with the same uniqueId but different version numbers.  One idea was that the framework would reconcile the view point of each bundle such that it "sees" at most one version of the bundles with any given unique-id.  Header lookup is not equivalent in this case.


Benjamin Reed <breed@xxxxxxxxxxxxxxx>
Sent by: equinox-dev-admin@xxxxxxxxxxx

10/06/2003 06:15 PM

        To:        pkriens <Peter.Kriens@xxxxxxxx>
        cc:        Pascal Rapicault/Ottawa/IBM@IBMCA, equinox-dev@xxxxxxxxxxx, BJ Hargrave <hargrave@xxxxxxxxxx>
        Subject:        Re: [equinox-dev] BundleContext and getName

Actually Peter, the discussion was about getting a bundle from the
location, not the name. They slipped another identifier in. Rather than
proliferating methods I would encourage using Bundle.getHeaders() to get
information about a specific bundle. If you want to add something to
BundleContext, it would seem much better to do
BundleContext.getBundles(Filter filter), where you can search on any of
the header fields. That way when you find out that you want to look up a
bundle by another manifest property (potentially Eclipse specific) you
don't have to add another method.


Peter Kriens wrote:

>I saw the discussion regarding the extra method in BundleContext to
>get a bundle from its name.
>We had this discussion in the past year in the OSGi and decided -not- to
>extend the BundleContext interface to keep it as simple as possible.
>There was quite a bit discussion about this.
>One thing that I proposed, which would more or less fit with the
>existing standard, is to register the bundle objects in the registry
>with properties for name, id, module, version, etc. This will allow
>you search for bundles with an OSGi filter. This may be a cleaner
>method than adding methods to BundleContext
>Kind regards,
>     Peter Kriens
>PR> Hi,
>PR> Currently BundleContext.getName(String) uses the Bundle-name entry to do
>PR> the lookup.
>PR> Now that we have Bundle-uniqueId, it seems to me that it would be more
>PR> appropriate to do the lookup on this value.
>PR> Any comments?
>PR>         PaScaL

equinox-dev mailing list