On 29/09/2016 13:12, Romain Manni-Bucau wrote:
> Hi guys,
> 
> StandardRoot does that at the moment (taken the 8.5.5 as a reference for
> this mail):
> 
> for (List<WebResourceSet> list : allResources) {
>     for (WebResourceSet webResourceSet : list) {
>         webResourceSet.start();
>     }
> }
> 
> // This has to be called after the other resources have been started
> // else it won't find all the matching resources
> processWebInfLib();
> // Need to start the newly found resources
> for (WebResourceSet classResource : classResources) {
>     classResource.start();
> }
> 
> 
> 
> This works well in a plain Tomcat but suppose you configure class resources
> before that method (statically or programmatically through a listener) then
> the iteration over allResources iterates over classesResources and then it
> is done again. Doesn't hurt much excepted this log:
> 
> 14:09:57.362 [main] INFO  org.apache.catalina.util.LifecycleBase - The
> start() method was called on component
> [org.apache.catalina.webresources.JarResourceSet@2ee5c08d] after start()
> had already been called. The second call will be ignored.
> 
> Would it be possible to modify it to be:

Happy to fix it, but the change below isn't right. It should be:
list != classResources

I'll fix this in the next couple of minutes.

Mark


> 
> for (List<WebResourceSet> list : allResources) {
>     for (WebResourceSet webResourceSet : list) {
>         if (webResourceSet != classResources) webResourceSet.start();
> 
>     }
> }
> 
> // This has to be called after the other resources have been started
> // else it won't find all the matching resources
> processWebInfLib();
> // Need to start the newly found resources
> for (WebResourceSet classResource : classResources) {
>     classResource.start();
> }
> 
> 
> ?
> 
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
> 


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

Reply via email to