You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Rob Walker <ro...@ascert.com> on 2008/10/13 16:03:52 UTC
Standard method to get Bundle or Bundle ID from a Bundle URL ??
Realised my Http cacheing code fails to get timestamps for JAR bundle
resources.
Couple of thoughts / questions on this:
* Bundle has a getLastModified call that I think I can use to help
with this - it won't be perfect, but it should aid cacheing at
least in between installs/updates of bundles.
* little rusty on latest Felix codebase - anyone know if there are
existing / standard utils to get either a Bundle or a Bundle ID
from a a bundle URL e.g
url:
bundle://32.0:1/resources/www/com.ascert.webui.vt.VtWebUi/js/ext/resources/images/default/grid/row-over.gif
* I'm wondering if we can enhance the bundle URL handler to actually
return this by default for a URLConnection, when getLastModified()
is called for a bundle URL so that code will by default at least
return the Bundle last modified time for a resource e.g
URLConnection conn = resUrl.openConnection();
lastModified = conn.getLastModified();
* Will take a look and see if I can find code for this and see how
feasible it might be.
-- Rob
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com
Re: Standard method to get Bundle or Bundle ID from a Bundle URL
??
Posted by Rob Walker <ro...@ascert.com>.
Stuart McCulloch wrote:
> 2008/10/13 Rob Walker <ro...@ascert.com>
>
>
>> Scratch that - my bad.
>> I think I'm looking at an old framework codebase. Looking at new code, I
>> think URLHandlersBundleURLConnection may have this in already.
>> Will test and report back if not.
>>
>
>
> see also: https://issues.apache.org/jira/browse/FELIX-659
>
>
Nice one - thanks for pointing out. I'll add a comment how this would
also help Http service too.
-- Rob
Re: Standard method to get Bundle or Bundle ID from a Bundle URL ??
Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/13 Rob Walker <ro...@ascert.com>
> Scratch that - my bad.
> I think I'm looking at an old framework codebase. Looking at new code, I
> think URLHandlersBundleURLConnection may have this in already.
> Will test and report back if not.
see also: https://issues.apache.org/jira/browse/FELIX-659
> - Rob
>
> Rob Walker wrote:
>
>> Realised my Http cacheing code fails to get timestamps for JAR bundle
>> resources.
>>
>> Couple of thoughts / questions on this:
>>
>> * Bundle has a getLastModified call that I think I can use to help
>> with this - it won't be perfect, but it should aid cacheing at
>> least in between installs/updates of bundles.
>> * little rusty on latest Felix codebase - anyone know if there are
>> existing / standard utils to get either a Bundle or a Bundle ID
>> from a a bundle URL e.g
>>
>> url:
>>
>> bundle://32.0:1/resources/www/com.ascert.webui.vt.VtWebUi/js/ext/resources/images/default/grid/row-over.gif
>>
>> * I'm wondering if we can enhance the bundle URL handler to
>> actually return this by default for a URLConnection, when
>> getLastModified() is called for a bundle URL so that code will
>> by default at least return the Bundle last modified time for a
>> resource e.g
>>
>> URLConnection conn = resUrl.openConnection();
>> lastModified = conn.getLastModified();
>>
>> * Will take a look and see if I can find code for this and see how
>> feasible it might be.
>>
>> -- Rob
>>
>>
>> Ascert - Taking systems to the Edge
>> robw@ascert.com
>> +44 (0)20 7488 3470
>> www.ascert.com
>>
>
> --
>
>
> Ascert - Taking systems to the Edge
> robw@ascert.com
> +44 (0)20 7488 3470
> www.ascert.com
>
>
--
Cheers, Stuart
Re: Standard method to get Bundle or Bundle ID from a Bundle URL
??
Posted by Rob Walker <ro...@ascert.com>.
Scratch that - my bad.
I think I'm looking at an old framework codebase. Looking at new code, I
think URLHandlersBundleURLConnection may have this in already.
Will test and report back if not.
- Rob
Rob Walker wrote:
> Realised my Http cacheing code fails to get timestamps for JAR bundle
> resources.
>
> Couple of thoughts / questions on this:
>
> * Bundle has a getLastModified call that I think I can use to help
> with this - it won't be perfect, but it should aid cacheing at
> least in between installs/updates of bundles.
> * little rusty on latest Felix codebase - anyone know if there are
> existing / standard utils to get either a Bundle or a Bundle ID
> from a a bundle URL e.g
>
> url:
> bundle://32.0:1/resources/www/com.ascert.webui.vt.VtWebUi/js/ext/resources/images/default/grid/row-over.gif
>
> * I'm wondering if we can enhance the bundle URL handler to
> actually return this by default for a URLConnection, when
> getLastModified() is called for a bundle URL so that code will
> by default at least return the Bundle last modified time for a
> resource e.g
>
> URLConnection conn = resUrl.openConnection();
> lastModified = conn.getLastModified();
>
> * Will take a look and see if I can find code for this and see how
> feasible it might be.
>
> -- Rob
>
>
> Ascert - Taking systems to the Edge
> robw@ascert.com
> +44 (0)20 7488 3470
> www.ascert.com
--
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com