On Thursday 18 August 2005 03:36, Daniel Fagerstrom wrote:
> Don't know, but I would assume that all OSGi implementation would need
> something like the bundle: protocol (although the name and syntax might
> not be standardized). Say that you have two bundles A and B that both
> contain the resource "foo.xml". If you use "URL getResource(String)" at
> the Bundle object of the A bundle the resulting URL must contain a
> reference to the A bundle to not confuse it with "foo.xml" from the B
> bundle.
Are we talking;
bundle://4/foo.xml
?
Then my implementation is;
URL resource = anyBundleContext.getBundle( 4 ).getResource( "foo.xml" );
Is there more to it??
Meaning it is dirt simple to make the bundle protocol (as described here (I
have not seen it in action anywhere)) as a protocol according to the spec,
and does not need any support from the OSGi implementation itself.
One can also support fancy search algorithms for the Bundle...
Cheers
Niclas