[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] BundleContext and getName
- From: Benjamin Reed <breed@xxxxxxxxxxxxxxx>
- Date: Tue, 07 Oct 2003 11:03:31 -0700
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
If the framework reconciles the view of each bundle, you still don't
have a problem searching headers. We have the same thing with
permissions and service registry -- the framework makes sure you only
see services that you are allowed to get.
If I understand correctly, everything you are trying to search on is
contained in the manifest. Right?
Jeff McAffer wrote:
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
> Peter Kriens
>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
>PR> appropriate to do the lookup on this value.
>PR> Any comments?
equinox-dev mailing list