DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001

Tag.release() not invoked





------- Additional Comments From [EMAIL PROTECTED]  2003-02-17 20:23 -------
OK guys, release() method is NOT guaranteed to be called on any tag handler, so
..there may be multiple invocations on doStartTag and doEndTag in between.

But programmers needs a method to initialize the tag between uses. Initializing
it at doStartTag method is not OK because setters are called before doStartTag
so programmer could clear the setted variables.

We need a method to initialize the tag before it's called, Maybe changing the
get method get() at TagHandlerPool.java

If not, please great gurus, how can we use tag pooling without this
initialization issues. JSP spec is not clear about this!

    public synchronized Tag get(Class handlerClass) throws JspException {
        Tag handler = null;
    
        if (current >= 0) {
            handler = handlers[current--];
     
// If handler is already in the cache release it
// It cannot be done at startTag not at EndTag because closed tags can
// return a java object
            handler.release();
        } else {
            try {
                return (Tag) handlerClass.newInstance();
            } catch (Exception e) {
                throw new JspException(e.getMessage(), e);
            }
        }

        return handler;
    }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to