geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: How to support loading resources in META-INF/resources of jar files in WEB-INF/*.jar
Date Tue, 11 May 2010 02:49:21 GMT
Thanks, Jack, it sounds a good idea. We even could give a global setting
whether we need to refresh the folder while starting the web application.
I am still thinking whether OSGI provides any easy api to acccess those
contents in the embbed jar files of bundle. If anyone know, please help to
figure out :-)

2010/5/11 Jack Cai <greensight@gmail.com>

> Shall we take #2 but do the extraction at deployment time? I understand it
> will break some user scenarios (e.g., update a CAR manually hoping a server
> restart will see the new content). But this is worth sacrificing considering
> that it will improve app startup performance - which is a much more frequent
> scenario.
>
> -Jack
>
>
> On Mon, May 10, 2010 at 9:55 PM, Ivan <xhhsld@gmail.com> wrote:
>
>> Hi,
>>     In Servlet 3.0, it is allowed to load the resource from
>> META-INF/resources of jar files in the WEB-INF folder while it is not found
>> in root folder. But now, in our BundleDirContext, there is not a direct way
>> (like getEntry) to read the resource.
>>     1. The simplest wayt is to wrap the url with zip stream, then iterator
>> it to find the resource. But it seems less efficient.
>>     2. Extract META-INF/resources from those jar files to the temp folders
>> ( even one big folder) while starting the bundleDirContext. With this
>> solution, extra disk space is required
>>     3. Use classloader to load resource, with this, we may load some
>> unwanted resource ...
>>     Personally, I like the #2.  Any thoughts ?
>> --
>> Ivan
>>
>
>


-- 
Ivan

Mime
View raw message