You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sebb <se...@gmail.com> on 2008/10/01 14:19:16 UTC
Re: svn commit: r700170 - /tomcat/tc6.0.x/trunk/STATUS.txt
On 29/09/2008, Mark Thomas <ma...@apache.org> wrote:
> sebb wrote:
> > On 29/09/2008, Mark Thomas <ma...@apache.org> wrote:
>
> >> ThreadLocals and container classloader environments need careful handling
> >> to avoid memory leaks.
> >
> > I would have thought that was a good reason to keep the class - one
> > only needs to get the code right once?
>
> If you don't use ThreadLocal, the code is much simpler so there is little
> to be gained by using a utility class. In this case of the two formats that
> were still used, one class was using each. It makes more sense to me to put
> the code specific to a class in that class and do away with what was a
> broken, deprecated and little used utility class.
>
>
> >> In this case the pain to make sure there wasn't a memory leak wasn't worth the gain.
> >
> > OK, point taken w.r.t. using synchronisation - the code should be
> > reasonably quick.
> >
> > But why not use an instance variable rather than a static class variable?
> > If there is more than 1 instance, each instance will have its own lock.
> > Which may share the load better.
>
> Creating the object is likely to be more expensive than using it. True I
> haven't tested it and if you have performance figures that suggest
> otherwise then it may be worth changing.
I don't know how the classes are used in Tomcat, but if each instance
is used many times, then the object creation cost needs to be compared
against the cost of multiple synchronisations.
If each instance is used only once - or only by a single thread - then
the synchronisation can be eliminated entirely.
But I have not done any tests to show which approach performs better.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@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
ExtensionValidator problem
Posted by Christian Pich <cm...@cs.uoregon.edu>.
Hi,
I found a bizarre behavior in the startup, i.e. in the
ExtensionValidator.validateManifestResources() method.
when an extension library is not found then this method logs a message
on 'info' level and returns a 'false'.
The return value is the right thing to do but since this validation
failure leads to a failure in starting up the context
the logging level should be 'error'. I encountered the problem and the
only message I got is an inconspicuous
'Error getConfigured' in the StandardContext. People typically do not
put the Tomcat classes into 'info' mode and they shouldn't.
Shall I file a bug?
Also, I'd be happy to fix this. How do I become a committer?
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org