[ http://issues.apache.org/jira/browse/VELTOOLS-62?page=comments#action_12435453 ] Claude Brisson commented on VELTOOLS-62: ----------------------------------------
Tools are meant to be reusable, while each webapp coder writes its toolbox file. Even if you are supposed to state in the docs of the tool which scopes it is supposed to be in, you cannot be sure they won't be misused. If you distribute a tool that is meant for the session scope, for instance, and if it is by error placed in a request scope, it can be a big performance issue since your tool will be initialized at each and every request. On the opposite, take the ParameterParser tool for instance. It is absolutely meaningless to put it in the session scope, but there won't be any error message... > New empty interfaces that allow one to enforce the scope of a tool > ------------------------------------------------------------------ > > Key: VELTOOLS-62 > URL: http://issues.apache.org/jira/browse/VELTOOLS-62 > Project: VelocityTools > Issue Type: Improvement > Reporter: Claude Brisson > Priority: Minor > Attachments: ApplicationTool.java, RequestTool.java, > ServletToolboxManager.patch, SessionTool.java > > > This is a proposal. Once that a tool implements at least one of the three > interfaces RequestTool, SessionTool or ApplicationTool, it means that the > actual scope of the tool must correspond to one of the interfaces the tool is > implementing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]