You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2013/08/21 19:46:04 UTC

Re: WebAppClassLoader#addrepository and #addURL

Hi

Browsing some code sources (groovy, xbean, tomee,...and i don'tepeak of
github) I found getURLs and addURL quite common and think it should be
supported by tomcat by default. Adding getURLs in WebResources wouldnt hurt
and would make the getURLs of the classloader trivial. The addURLs should
just use a particular WebResource.

Do you think it is possible to get it in t8?
Le 25 avr. 2013 08:01, "Romain Manni-Bucau" <rm...@gmail.com> a
écrit :

> Thanks, playing with org.apache.catalina.WebResourceRoot can work.
>
> That said not respecting addURL maybe means you should override it to
> throw an UnsupportedOperataion no? + the comment
> of org.apache.catalina.loader.WebappClassLoader#getURLs is weird since it
> references addURL
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/4/24 Konstantin Kolinko <kn...@gmail.com>
>
>> 2013/4/24 Mark Thomas <ma...@apache.org>:
>> > On 24/04/2013 17:51, Romain Manni-Bucau wrote:
>> >>
>> >> how libs/extension (like tomee) should extend it?
>> >
>> >
>> > Use the replacement feature.
>> >
>>
>> resources
>>
>> In nightly Tomcat 8 docs those are described here:
>> http://ci.apache.org/projects/tomcat/tomcat8/docs/config/resources.html
>>
>>
>> > (...)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>

Re: WebAppClassLoader#addrepository and #addURL

Posted by Romain Manni-Bucau <rm...@gmail.com>.
How does an app would scan its content? (dont say a sci it doesnt match a
lot of cases)
Le 21 août 2013 20:00, "Mark Thomas" <ma...@apache.org> a écrit :

> On 21/08/2013 18:46, Romain Manni-Bucau wrote:
> > Hi
> >
> > Browsing some code sources (groovy, xbean, tomee,...and i don'tepeak of
> > github) I found getURLs and addURL quite common and think it should be
> > supported by tomcat by default. Adding getURLs in WebResources wouldnt
> hurt
> > and would make the getURLs of the classloader trivial. The addURLs should
> > just use a particular WebResource.
> >
> > Do you think it is possible to get it in t8?
>
> What exactly are you proposing?
>
> There is no such class as WebResources.
>
> getURLs() on what, returning what?
>
> addURLs() on what, doing what?
>
> The Tomcat 7 approach was based on URLs and they were generally a pain
> to work with - particularly from a performance point of view. There
> would need to be a valid use case that couldn't be met by the existing
> code to justify it.
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: WebAppClassLoader#addrepository and #addURL

Posted by Mark Thomas <ma...@apache.org>.
On 21/08/2013 18:46, Romain Manni-Bucau wrote:
> Hi
> 
> Browsing some code sources (groovy, xbean, tomee,...and i don'tepeak of
> github) I found getURLs and addURL quite common and think it should be
> supported by tomcat by default. Adding getURLs in WebResources wouldnt hurt
> and would make the getURLs of the classloader trivial. The addURLs should
> just use a particular WebResource.
> 
> Do you think it is possible to get it in t8?

What exactly are you proposing?

There is no such class as WebResources.

getURLs() on what, returning what?

addURLs() on what, doing what?

The Tomcat 7 approach was based on URLs and they were generally a pain
to work with - particularly from a performance point of view. There
would need to be a valid use case that couldn't be met by the existing
code to justify it.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org