- Add a specific flag for recycling facades (when security is on, recycling will always be done, obviously).
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@470756
13f79535-47bb-0310-9956-
ffa450edef68
private static Log log = LogFactory.getLog(Connector.class);
+ /**
+ * Alternate flag to enable recycling of facades.
+ */
+ public static final boolean RECYCLE_FACADES =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.connector.RECYCLE_FACADES", "false")).booleanValue();
+
+
// ------------------------------------------------------------ Constructor
requestedSessionId = null;
requestedSessionURL = false;
- if (Constants.SECURITY) {
+ if (Constants.SECURITY || Connector.RECYCLE_FACADES) {
parameterMap = new ParameterMap();
} else {
parameterMap.setLocked(false);
mappingData.recycle();
- if (Constants.SECURITY) {
+ if (Constants.SECURITY || Connector.RECYCLE_FACADES) {
if (facade != null) {
facade.clear();
facade = null;
cookies.clear();
- if (Constants.SECURITY) {
+ if (Constants.SECURITY || Connector.RECYCLE_FACADES) {
if (facade != null) {
facade.clear();
facade = null;
* a root cause exception
*/
protected void report(Request request, Response response,
- Throwable throwable)
- throws IOException {
+ Throwable throwable) {
// Do nothing on non-HTTP responses
int statusCode = response.getStatus();