We should probably start a JIRA issue on this and if we get a patch, we
should probably run it by the Spring guys, since I know they are pretty
dependent on resource handling.
-> richard
Guillaume Sauthier wrote:
But reconsidering the initial problem mentioned by Guillaume: Only
local
resources returned. I am not sure why Guillaume mentions the
ContentClassLoader, because the main accessor to resource
Enumeration is
the Bundle.getResources method.
In fact, I'm not using Bundle.getResources().
The problem occurs in a non-OSGi library that use directly
ClassLoader API.
So, as it's running in OSGi, it use a ContentClassLoader
implementation, but as getResources() is not overridden, we only use
classic ClassLoader search mechanism.
Last thing, I cannot change the lib to make it use OSGi ...
After a bit of digging, instead of using a Factory, with a Java5
compiled ContentClassLoader, that add a lot of burden (I know, I've
tried that :) ), maybe it could be easier and more elegant to simply
have the ContentClassLoader.findResources(String) method implemented
using the ISearchPolicy to find the resources instead of just asking
the IContentLoader for local resources.
BTW, this scenario will work if the R4SearchPolicyCore return a
compund enumeration of ALL the found resources.
Thanks
--Guillaume