You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/20 06:31:34 UTC

[jira] Closed: (STR-1308) HttpSessionBindingListener.valueUnbound() called on every request to an ActionForm

     [ https://issues.apache.org/struts/browse/STR-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict closed STR-1308.
------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)
                   1.3.5
         Assignee:     (was: Struts Developers)

The enhancement has been implemented by FormBeanConfig.canReuse().  The CreateActionForm command invokes the method. Use the ComposableRequestProcessor to recycle forms.

> HttpSessionBindingListener.valueUnbound() called on every request to an ActionForm
> ----------------------------------------------------------------------------------
>
>                 Key: STR-1308
>                 URL: https://issues.apache.org/struts/browse/STR-1308
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Future
>         Environment: Operating System: All
> Platform: All
>            Reporter: Phil McGee
>            Priority: Minor
>             Fix For: 1.3.5
>
>         Attachments: FormTag.diff, RequestProcessor.diff, RequestUtils.diff
>
>
> The behavior of the Struts RequestProcessor prevents the use of the 
> HttpSessionBindingListener interface to detect a session timeout on session 
> scoped ActionForm beans.
> When an ActionForm derived bean with session scope implements 
> HttpSessionBindingListener the valueUnbound() and valueBound()methods are 
> called on every client request mapped to that bean.  This was observed on 
> Tomcat versions 4.04 and 4.1.18.  Apparently, the method 
> org.apache.struts.action.RequestProcessor.processActionForm() calls 
> session.setAttribute()to store the bean in the session even if the bean is 
> already stored there.  This causes the servlet container to issue a valueUnbound
> () call when the existing reference is removed and a valueBound() call when the 
> new reference (to the same bean) is added to the session.  This behavior 
> prevents the use of those methods to detect and respond to session timeout 
> events.

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