Yes, Stuart. If you look at my earlier responses on the thread, I have
mentioned how I used Spring-DM.

Thanks,

Thomas

On Mon, Jun 23, 2008 at 4:42 PM, Stuart McCulloch <
[EMAIL PROTECTED]> wrote:

> 2008/6/23 Thomas Joseph <[EMAIL PROTECTED]>:
>
>> Yes, I did getResources(). I tried the search strings such as
>> "/META-INF/*.xml", "/META-INF/" etc for it, but unfortunately I could not
>> get it working. I suppose that the getResources won't support wildcards
>> natively.
>
>
> that's correct - only Bundle.findEntries supports wildcards, but that won't
> search inside embedded jarfiles (because it doesn't use the classloader)
>
> getResources would only work if all the XML files had the same name but
> were located in different packages / fragments, which isn't what you want
>
> otherwise, you could try re-using the resource searching from Spring-DM:
>
>
> https://fisheye.springframework.org/browse/spring-osgi/trunk/io/src/main/java/org/springframework/osgi/io
>
> some of the utility classes might be usable outside of Spring, otherwise
> you might be able to use this as a guide to implement what you need...
>
> HTH
>
> On Mon, Jun 23, 2008 at 12:40 PM, Peter Kriens <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> On 20 jun 2008, at 13:08, Thomas Joseph wrote:
>>>
>>> Thanks Edward,
>>> Yes I did try the getResource(), but it won't support wildcards natively,
>>>
>>> Did you try getResources(String prefix)?
>>>
>>> This allows you to scan for resources with class path support.
>>>
>>> Kind regards,
>>>
>>> Peter Kriens
>>>
>>>
>>>
>>>
>>> Actually, I am using Spring DM 1.1.0-m2 along for Web Development in
>>> OSGi. But this has a bug and won;t work outside Spring MVC (I am not using
>>> it). This bug is available ini the RC-1 SNAPSHOT, that I wanted to avoid.
>>> Spring DM's resource abstraction provides a solution to this.
>>>
>>> However, within M2, I used some code (instead of being declarative) and
>>> Spring-DM to get a workaround without switching to the RC1 SNAPSHOT. I went
>>> through the Spring DM code on this to found that getting to my solution
>>> through plain coding without dm, will take up a good amount of my time and
>>> energy (Afterall thats why we use libraries !)
>>>
>>> Thanks a lot!
>>>
>>> On Fri, Jun 20, 2008 at 3:36 PM, Edward Yakop <[EMAIL PROTECTED]>
>>> wrote:
>>>
>>>> On Fri, Jun 20, 2008 at 4:11 PM, Thomas Joseph <[EMAIL PROTECTED]>
>>>> wrote:
>>>> > Hi All,
>>>> >
>>>> > I am embedding few jars inside my bundle and reffered them in my
>>>> > Bundle-Classpath entry.
>>>> >
>>>> > Now I would like my code to access all the *.xml files inside those
>>>> embedded
>>>> > jars.
>>>> >
>>>> > Any ways I could do this?
>>>>
>>>> You would need to grab your bundle context.
>>>> And u can do the following:
>>>>
>>>> BundleContext context;
>>>> context.getBundle().getResources( "pathToResource" );
>>>>
>>>> Regards,
>>>> Edward Yakop
>>>>
>>>> _______________________________________________
>>>> general mailing list
>>>> [email protected]
>>>> http://lists.ops4j.org/mailman/listinfo/general
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Thanks and Regards,
>>>
>>> Thomas Joseph
>>> ------------------------------------------------------------
>>> Promote Open Source - Promote Liberty of Ideas and Software.
>>>  ------------------------------------------------------------
>>> _______________________________________________
>>> general mailing list
>>> [email protected]
>>> http://lists.ops4j.org/mailman/listinfo/general
>>>
>>>
>>>
>>> _______________________________________________
>>> general mailing list
>>> [email protected]
>>> http://lists.ops4j.org/mailman/listinfo/general
>>>
>>>
>>
>>
>> --
>> --
>> Thanks and Regards,
>>
>> Thomas Joseph
>> ------------------------------------------------------------
>> Promote Open Source - Promote Liberty of Ideas and Software.
>> ------------------------------------------------------------
>>
>> _______________________________________________
>> general mailing list
>> [email protected]
>> http://lists.ops4j.org/mailman/listinfo/general
>>
>>
>
>
> --
> Cheers, Stuart
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>
>


-- 
-- 
Thanks and Regards,

Thomas Joseph
------------------------------------------------------------
Promote Open Source - Promote Liberty of Ideas and Software.
------------------------------------------------------------
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to