tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1492331 - in /tomcat/tc7.0.x/trunk: ./ java/javax/servlet/ java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ test/org/apache/catalina/core/ test/org/apache/catalina/...
Date Fri, 14 Jun 2013 09:38:42 GMT
On 14/06/2013 07:55, Violeta Georgieva wrote:
> 2013/6/12 <markt@apache.org>
>>
>> Author: markt
>> Date: Wed Jun 12 18:31:30 2013
>> New Revision: 1492331
>>
>> URL: http://svn.apache.org/r1492331
>> Log:
>> With clarification from the EG for Servlet 3.1 section 4.4 finally makes
> sense. Implement the necessary restriction and add a test case.
 >
> I think that we should provide the same restriction for the
> ServletContextListeners that are not described in web.xml/web-fragment.xml
> or are not annotated. For example such listeners can be added by
> ServletContainerInitializer.
>
> What do you think?

Short answer - yes, I agree.

I then went to look at the code to figure out how / where to do this and 
it took me a little while to figure out what was going on. I've added a 
bunch of comments to clarify things that I'll commit shortly. Now I 
understand the code again, the fix looks simple.

Mark

>
>
>
> o.a.catalina.core.ApplicationContext.addListener(T t)
> ...
>          if (t instanceof HttpSessionListener
>                  || (t instanceof ServletContextListener &&
>                          newServletContextListenerAllowed)) {
> ->            context.addApplicationLifecycleListener(t);
>              match = true;
>          }
> ....
>


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


Mime
View raw message