Craig,
As you requested... I've attached diffs for the java file and for the jsp.
Let me know if you have any questions / comments.
-casey
"Craig R. McClanahan" wrote:
>
> On Thu, 17 May 2001, Casey Lucas wrote:
>
> >
> > I finally had some time last night to see why all of the watchdog tests
> > wouldn't run correctly if tag pooling was turned on.
> >
> > Based on my understanding of the spec I think that that some of the code
> > included in watchdog may be incorrect. The spec says that a tag handler
> > can be used multiple times and that release() should be called before the
> > tag handler gets garbage collected. But
> > src\server\jsp-tests\WEB-INF\classes\jsp\tags\examples\TestTag.java relies
> > on release() being called after every use of the tag.
> >
>
> It wouldn't surprise me if Watchdog made some incorrect assumptions
> here. Tag lifecycle seems to confuse lots of people, and because Tomcat
> didn't implement pooling there wasn't an easy way to catch errors.
>
> If you've got diffs to fix the assumptions, I can evaluate them and check
> them in. If it's more complicated than that, I'll forward the relevant
> info to the folks that wrote the Watchdog tests for comment and action.
>
> > The code shouldn't be hard to fix for all situations except the test of
> > the release method itself. If pooling is in use, then release will
> > only be called when the web context is unloaded or an exception is thrown
> > during tag usage. We could modify the "release test" to throw an exception
> > during tag usage and hence cause release to be called, but I'm not sure
> > we should because the spec doesn't say anything about reuse of a tag handler
> > when an exception is thrown. For example, I guess a container would be compliant
> > if reused a tag (and hence didn't call release) even in the case of exceptions.
> >
> >
> > So, my questions are:
> >
> > 1. Is the watchdog test I've described bad and need fixing?
> >
> > 2. If so, any comments on what to do with the "release test"?
> >
> >
> >
> > -casey
> >
>
> Craig
TestTag.java.diff
positiveRelease.jsp.diff