Hi Remy,
you mean this fix is better?
==
Index: /tomcat55/container/catalina/src/share/org/apache/catalina/
core/ApplicationDispatcher.java
===================================================================
--- /tomcat55/container/catalina/src/share/org/apache/catalina/core/
ApplicationDispatcher.java (revision 548796)
+++ //tomcat55/container/catalina/src/share/org/apache/catalina/core/
ApplicationDispatcher.java (working copy)
@@ -361,9 +361,11 @@
wrequest.setPathInfo(hrequest.getPathInfo());
wrequest.setQueryString(hrequest.getQueryString());
- processRequest(request,response,state);
-
- wrequest.recycle();
+ try {
+ processRequest(request,response,state);
+ } finally {
+ wrequest.recycle();
+ }
unwrapRequest(state);
}
@@ -400,9 +402,11 @@
wrequest.setQueryParams(queryString);
}
- processRequest(request,response,state);
-
- wrequest.recycle();
+ try {
+ processRequest(request,response,state);
+ } finally {
+ wrequest.recycle();
+ }
unwrapRequest(state);
}
@@ -553,9 +557,11 @@
wrequest.setAttribute(
ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
servletPath);
- invoke(state.outerRequest, state.outerResponse, state);
-
- wrequest.recycle();
+ try {
+ invoke(state.outerRequest, state.outerResponse, state);
+ } finally {
+ wrequest.recycle();
+ }
}
// Handle an HTTP path based include
@@ -591,9 +597,11 @@
wrequest.setAttribute(
ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
servletPath);
- invoke(state.outerRequest, state.outerResponse, state);
-
- wrequest.recycle();
+ try {
+ invoke(state.outerRequest, state.outerResponse, state);
+ } finally {
+ wrequest.recycle();
+ }
}
}
Can you explain why unwrapRequest is called at doForward()
L. 310, L 410 and again at invoke L 777 ?
Why you think we must not close the repsonse at doForward after an
exceptions is throws at processRequest()?
Regards
peter
Am 20.06.2007 um 09:57 schrieb Remy Maucherat:
Peter Rossbach wrote:
Hi remy,
I think the problem is real. Some portlet api and modularized web
applications have this problem.
Why you veto a fix without a better proposal? I don't see
currently an option without a try/finally block.
Because your patch moved things around, and added way more than one
try/finally. If all you need to do is make sure you call recycle on
the wrapper (which calls endAccess on the session) if it's a cross
context request, then you should be able to do better.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]