You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ori (JIRA)" <ji...@apache.org> on 2008/12/18 23:37:37 UTC
[jira] Created: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
-----------------------------------------------------------------------------------------------------
Key: STR-3174
URL: https://issues.apache.org/struts/browse/STR-3174
Project: Struts 1
Issue Type: Bug
Components: Core
Affects Versions: 1.3.10
Environment: n/a
Reporter: ori
The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
The release() method should be invoked regardless of the result of the execution.
To fix, simply add a finally clause around the line like this:
finally {
context.release();
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (STR-3174)
ComposableRequestProcessor.process() should invoke Context's release()
method inside a finally clause
Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45324#action_45324 ]
paul4christ79 edited comment on STR-3174 at 12/19/08 4:50 PM:
--------------------------------------------------------------
I am fixing this in 1.4 (HEAD) because I don't know what kind of side-effect it might cause for 1.3. If you can tell me how this issue is affecting you in 1.3, I will commit it also to 1.3.11
was (Author: paul4christ79):
I am fixing this in 1.4 (HEAD) because I don't know what kind of regression that might cause for 1.3. If you can tell me how this bug is affecting you in 1.3, I will commit it also to 1.3.11
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
> Assignee: Paul Benedict
> Priority: Minor
> Fix For: 1.3.11, 1.4.0
>
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45323#action_45323 ]
Paul Benedict commented on STR-3174:
------------------------------------
Thanks for the issue report. How did you come across this suggestion? Is not releasing the context causing a problem for you?
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45345#action_45345 ]
Paul Benedict commented on STR-3174:
------------------------------------
Sounds like a reasonable backport.
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
> Assignee: Paul Benedict
> Priority: Minor
> Fix For: 1.3.11, 1.4.0
>
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict resolved STR-3174.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.4.0
Assignee: Paul Benedict
I am fixing this in 1.4 (HEAD) because I don't know what kind of regression that might cause for 1.3. If you can tell me how this bug is affecting you in 1.3, I will commit it also to 1.3.11
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
> Assignee: Paul Benedict
> Fix For: 1.4.0
>
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-3174:
-------------------------------
Priority: Minor (was: Major)
Fix Version/s: 1.3.11
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
> Assignee: Paul Benedict
> Priority: Minor
> Fix For: 1.3.11, 1.4.0
>
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (STR-3174) ComposableRequestProcessor.process()
should invoke Context's release() method inside a finally clause
Posted by "ori (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/STR-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45343#action_45343 ]
ori commented on STR-3174:
--------------------------
Thanks for the quick reply.
I have a custom implementation of Context which cleans up other resources using release() (e.g., a JDBC Connection).
It is not urgent because I found it much easier to add a Filter to the "servlet-standard" chain which invokes release() in its postprocess() method. This guarantees the context will be cleaned up properly.
> ComposableRequestProcessor.process() should invoke Context's release() method inside a finally clause
> -----------------------------------------------------------------------------------------------------
>
> Key: STR-3174
> URL: https://issues.apache.org/struts/browse/STR-3174
> Project: Struts 1
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.10
> Environment: n/a
> Reporter: ori
> Assignee: Paul Benedict
> Fix For: 1.4.0
>
>
> The process method in org.apache.struts.chain.ComposableRequestProcessor invokes release() on the ActionContext only on success.
> The release() method should be invoked regardless of the result of the execution.
> To fix, simply add a finally clause around the line like this:
> finally {
> context.release();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.