You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2007/03/02 03:38:27 UTC
svn commit: r513601 - in /tomcat/tc6.0.x/trunk:
java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml
Author: markt
Date: Thu Mar 1 18:38:26 2007
New Revision: 513601
URL: http://svn.apache.org/viewvc?view=rev&rev=513601
Log:
Port fix for bug 41739. Servlets with a load-on-startup value of zero should be loaded first.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?view=diff&rev=513601&r1=513600&r2=513601
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu Mar 1 18:38:26 2007
@@ -4021,8 +4021,6 @@
int loadOnStartup = wrapper.getLoadOnStartup();
if (loadOnStartup < 0)
continue;
- if (loadOnStartup == 0) // Arbitrarily put them last
- loadOnStartup = Integer.MAX_VALUE;
Integer key = new Integer(loadOnStartup);
ArrayList list = (ArrayList) map.get(key);
if (list == null) {
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=513601&r1=513600&r2=513601
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Mar 1 18:38:26 2007
@@ -25,6 +25,10 @@
when the serviet is reading/writing from the input/output streams
The flag is <code>-Dorg.apache.tomcat.util.net.NioSelectorShared=true</code>
</update>
+ <fix>
+ <bug>41739</bug> Correct handling of servlets with a load-on-startup
+ value of zero. These are now the first servlets to be started. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Webapps">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r513601 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml
Posted by Remy Maucherat <re...@apache.org>.
Tim Funk wrote:
> So an older version of the spec had 0 special case where zero meant load
> on startup - but don't care when. (Since zero is not a positive
> integer). That special case disappeared starting in spec version 2.3.
So it's probably because of this that this code was present. I don't
know if there's a test about this in the TCK.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r513601 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml
Posted by Tim Funk <fu...@joedog.org>.
Re-reading the 2.4 spec - most references to load-on-startup state any
non-negative number gets loaded in order lowest to highest. (Starting at 0)
BUT in the 2.2 DTD - there is this gem:
"The load-on-startup element indicates that this servlet should be
loaded on the startup of the web application.
The optional contents of these element must be a positive integer
indicating the order in which the servlet should be loaded.
Lower integers are loaded before higher integers.
If no value is specified, or if the value specified is not a positive
integer, the container is free to load it at any time in the startup
sequence."
So an older version of the spec had 0 special case where zero meant load
on startup - but don't care when. (Since zero is not a positive
integer). That special case disappeared starting in spec version 2.3.
-Tim
Remy Maucherat wrote:
> markt@apache.org wrote:
>> Author: markt
>> Date: Thu Mar 1 18:38:26 2007
>> New Revision: 513601
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=513601
>> Log:
>> Port fix for bug 41739. Servlets with a load-on-startup value of zero
>> should be loaded first.
>
> I am not convinced by this (and the other non issues reported by this
> person), since this code was apparently present on purpose.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r513601 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
Remy Maucherat wrote:
> markt@apache.org wrote:
>> Author: markt
>> Date: Thu Mar 1 18:38:26 2007
>> New Revision: 513601
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=513601
>> Log:
>> Port fix for bug 41739. Servlets with a load-on-startup value of zero
>> should be loaded first.
>
> I am not convinced by this (and the other non issues reported by this
> person), since this code was apparently present on purpose.
Perhaps reading the spec will convince you.
<quote>
If the value is a positive integer or 0, the container must load and
initialize the servlet as the application is deployed. The container
must guarantee that servlets marked with lower integers are loaded
before servlets marked with higher integers.
</quote>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r513601 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml
Posted by Remy Maucherat <re...@apache.org>.
markt@apache.org wrote:
> Author: markt
> Date: Thu Mar 1 18:38:26 2007
> New Revision: 513601
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=513601
> Log:
> Port fix for bug 41739. Servlets with a load-on-startup value of zero should be loaded first.
I am not convinced by this (and the other non issues reported by this
person), since this code was apparently present on purpose.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org