请教关于servlet2.4规范中的一句话的理解。
bzwm 2009-02-26 03:42:21 servlet2.4规范中有这么一句话,对于红色字体部门不是很理解。
帮解释一下。
1.容器怎样能重用request objects呢?另外,是怎样的request objects才可以被recycle呢?
2.对于最后一句话,如果我在outside the scope的地方通过这个request对象引用使用它,会怎样呢?
谢谢!
SRV.4.10 Lifetime of the Request Object
Each request object is valid only within the scope of a servlet’s service method, or within the scope of a filter’s doFilter method. Containers commonly recycle request objects in order to avoid the performance overhead of request object creation.
The developer must be aware that maintaining references to request objects outside the scope described above is not recommended as it may have indeterminate
results.