Niclas Hedhman wrote:
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" );
Sure.
Is there more to it??
That an OSGi framework need to have a protocol like the bundle protocol
as part of its implementation to be able to implement Bundle.getResource
as motivated in my example above.
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.
Not to implement it but as motivated above it must AFAICS allready be
part of the implementation.
One can also support fancy search algorithms for the Bundle...
I'm not certain about what you refer to but in R3 you can just access
resources that you allready have the path for not list the content of a
resource directory or something like that. In R4 you can though. That is
one of the reasons that we need R4 for Cocoon, the others are better
version handling and ASF compliant license.
/Daniel