[ 
https://issues.apache.org/struts/browse/WW-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44709#action_44709
 ] 

sutter2k commented on WW-2167:
------------------------------

This definitely does mess with sitemesh decorators.  re
I would like to see this re-opened

While simple decoration is fine, what is available to its context is different

http://www.nabble.com/Struts-2.1.2(an-previous-releases)-vs-2.1.3-in-regards-to-actionMessages-in-a-sitemesh-decorator-td19361286.html#a19366415

paste discussion

matt.payne wrote:
> There seem to be some type of regression that has happen with regards to
> actionMessage/actionErrors.
>
> In the current build snapshots of 2.1.3 actionErrors/message are no longer
> exposed my to the sitemesh decorator(I am using freemarker result
> types/decorators).  However that are still available to the direct result,
> just not within the decorators.  
>  

In 2.1.3 there have been some changes around the FilterDispatcher and
ActionContextCleanup.
You may notice the FilterDispatcher is deprecated.

See the struts-dev "New Filter Strategy RFC" thread started on 22 June 08.

I haven't paid attention to what's changed and have some code running
with the older filters and some on the new. I'm certain none of my code
uses action messages inside decorators though.

In 2.1.2, the resolution of WW-2167 also carried some risk for sitemesh
decorators:
https://issues.apache.org/struts/browse/WW-2167


> Memory leak when app stopped
> ----------------------------
>
>                 Key: WW-2167
>                 URL: https://issues.apache.org/struts/browse/WW-2167
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: WebSphere 6.1.0.9 (non-network deploy) on Windows XP 
> Professional
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20070608 
> (SR5+IY99712))
> IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 
> j9vmwi3223-20070426 (JIT enabled)
> J9VM - 20070420_12448_lHdSMR
> JIT  - 20070419_1806_r8
> GC   - 200704_19)
> JCL  - 20070608
>            Reporter: Adam Crume
>            Assignee: Jeromy Evans
>             Fix For: 2.1.2
>
>         Attachments: ActionContextReleasingFilterDispatcher.java, 
> FilterDispatcher_leak-fix.java, log_leak.png
>
>
> Struts 2 somehow prevents the app's classes from being garbage collected when 
> the application is stopped or undeployed.
> I created a barebones Struts 2 app with an action with the following code:
>       private static final Object x = new Object() {
>               {
>                       System.out.println("================== Object created: 
> " + hashCode() + " ===================");
>               }
>               protected void finalize() throws Throwable {
>                       System.out.println("**************** Object finalized: 
> " + hashCode() + " *********************");
>               };
>       };
> Because of this static field, a message should be printed when the class is 
> initialized and when it is garbage collected.  "Object created" would be 
> printed out whenever I went to the action for the first time, but restarting 
> the app never printed "Object finalized."  This is not an issue with garbage 
> collection in my web container because doing the same thing with a servlet 
> resulted in both messages being printed.
> One problem is that the FilterDispatcher.init() method sets a ThreadLocal but 
> never clears it.  I fixed that by adding ActionContext.setContext(null); to 
> the end of the init() method, but that didn't solve the larger problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to