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/04/24 17:47:23 UTC

WebAppClassLoader#addrepository and #addURL

Hi guys,

looked quickly tomcat-8 and seems the addrepository method is no more here
and addURL method is not respected (parent class)

1. is it intended?

i didnt find VirtualWebappClassloader too. This feature seems often used
and extended and this last part sounds for me like an issue when people
will migrate to t8 (from t7)

2. is it an "in progress" area or is it a known issue?

*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*

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


Re: WebAppClassLoader#addrepository and #addURL

Posted by Romain Manni-Bucau <rm...@gmail.com>.
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>.
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 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 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.

> forking?

That should not be necessary.

Mark

>
> *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 Mark Thomas <ma...@apache.org>
>
>> On 24/04/2013 16:47, Romain Manni-Bucau wrote:
>>
>>> Hi guys,
>>>
>>> looked quickly tomcat-8 and seems the addrepository method is no more here
>>> and addURL method is not respected (parent class)
>>>
>>> 1. is it intended?
>>>
>>
>> Yes.
>>
>>
>>   i didnt find VirtualWebappClassloader too. This feature seems often used
>>> and extended and this last part sounds for me like an issue when people
>>> will migrate to t8 (from t7)
>>>
>>> 2. is it an "in progress" area
>>>
>>
>> No.
>>
>>
>>   or is it a known issue?
>>>
>>
>> It is a non-issue.
>>
>> Mark
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.**org<de...@tomcat.apache.org>
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>


---------------------------------------------------------------------
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 libs/extension (like tomee) should extend it? forking?

*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 Mark Thomas <ma...@apache.org>

> On 24/04/2013 16:47, Romain Manni-Bucau wrote:
>
>> Hi guys,
>>
>> looked quickly tomcat-8 and seems the addrepository method is no more here
>> and addURL method is not respected (parent class)
>>
>> 1. is it intended?
>>
>
> Yes.
>
>
>  i didnt find VirtualWebappClassloader too. This feature seems often used
>> and extended and this last part sounds for me like an issue when people
>> will migrate to t8 (from t7)
>>
>> 2. is it an "in progress" area
>>
>
> No.
>
>
>  or is it a known issue?
>>
>
> It is a non-issue.
>
> Mark
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.**org<de...@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 24/04/2013 16:47, Romain Manni-Bucau wrote:
> Hi guys,
>
> looked quickly tomcat-8 and seems the addrepository method is no more here
> and addURL method is not respected (parent class)
>
> 1. is it intended?

Yes.

> i didnt find VirtualWebappClassloader too. This feature seems often used
> and extended and this last part sounds for me like an issue when people
> will migrate to t8 (from t7)
>
> 2. is it an "in progress" area

No.

> or is it a known issue?

It is a non-issue.

Mark


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