tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: Incorrect code for custom actions [Was: Re: 3.2 beta status update]
Date Mon, 03 Jul 2000 09:55:41 GMT
Danno Ferrin wrote:
> Here is a quick fix that should solve the problem in a single threaded
> environment.  And you are right on about the race conditions, where multiple
> paralell compilations could cause a race, but there is a lock in JspServlet
> where it locks on "this" that solves most races, but in the case where a
> pool of servlet instances services the JspServlet there could be a
> colission.  IIRC such pooling is not barred by the spec, (and there are
> other ways to induce that race) so synching on  TagGeneratorBase.class in
> lines 178-183 of .../jasper/compiler/ should end that race, it
> appears to me to be the best gate point around the JspParseEventListener
> class, which is the only class to use instances of TagGeneratorBase
> sub-classes and classes.  A better long-term solution would be to move the
> services provided by those static classes into the JspCompliationContext
> class (which would require an API change which instantly makes it a 3.3
> target)
> But I digress, here is a patch you can try.
> [...]

Thanks for your help. I had already started to fix it in a different way
when I got your mail, see the commit message. If you see any problems
with my solution, please let me know.

Hans Bergsten
Gefion Software

View raw message