You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Kristian Rosenvold (JIRA)" <ji...@apache.org> on 2010/03/14 08:35:27 UTC

[jira] Created: (WW-3407) Convention plugin eager-loads spring components upon initialization of convention configuration

Convention plugin eager-loads spring components upon initialization of convention configuration
-----------------------------------------------------------------------------------------------

                 Key: WW-3407
                 URL: https://issues.apache.org/jira/browse/WW-3407
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Convention
    Affects Versions: 2.1.8.1, 2.2.0
         Environment: spring 2.5+
            Reporter: Kristian Rosenvold
         Attachments: strutsConventionEagerloading.patch

Our action classes have their life cycle managed by spring, and they are /request/ scoped. When the convention plugin initializes the struts configuration it tries to initialize the spring beans. This does work because "request" scope does not exist at the time the struts config is created.

The enclosed patch simply removes the eager-loading since it is only done as an optimization (and maybe eager early consistency check). It would be possible to make this a flag although I really think the default should be "off"; the "off" behavior is consistent with behavior of "older" struts technologies in this respectearlier struts versions..

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


[jira] Updated: (WW-3407) Convention plugin eager-loads spring components upon initialization of convention configuration

Posted by "Kristian Rosenvold (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated WW-3407:
-----------------------------------

    Attachment: strutsConventionEagerloading.patch

Patch that removes eagerloading, applies to 2.2 trunk. I have CLA on file with apache.

> Convention plugin eager-loads spring components upon initialization of convention configuration
> -----------------------------------------------------------------------------------------------
>
>                 Key: WW-3407
>                 URL: https://issues.apache.org/jira/browse/WW-3407
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.1.8.1, 2.2.0
>         Environment: spring 2.5+
>            Reporter: Kristian Rosenvold
>         Attachments: strutsConventionEagerloading.patch
>
>
> Our action classes have their life cycle managed by spring, and they are /request/ scoped. When the convention plugin initializes the struts configuration it tries to initialize the spring beans. This does work because "request" scope does not exist at the time the struts config is created.
> The enclosed patch simply removes the eager-loading since it is only done as an optimization (and maybe eager early consistency check). It would be possible to make this a flag although I really think the default should be "off"; the "off" behavior is consistent with behavior of "older" struts technologies in this respectearlier struts versions..

-- 
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: (WW-3407) Convention plugin eager-loads spring components upon initialization of convention configuration

Posted by "Kristian Rosenvold (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845043#action_12845043 ] 

Kristian Rosenvold edited comment on WW-3407 at 3/14/10 7:36 AM:
-----------------------------------------------------------------

Patch that removes eagerloading, applies to 2.2 trunk

      was (Author: krosenvold):
    Patch that removes eagerloading, applies to 2.2 trunk. I have CLA on file with apache.
  
> Convention plugin eager-loads spring components upon initialization of convention configuration
> -----------------------------------------------------------------------------------------------
>
>                 Key: WW-3407
>                 URL: https://issues.apache.org/jira/browse/WW-3407
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.1.8.1, 2.2.0
>         Environment: spring 2.5+
>            Reporter: Kristian Rosenvold
>         Attachments: strutsConventionEagerloading.patch
>
>
> Our action classes have their life cycle managed by spring, and they are /request/ scoped. When the convention plugin initializes the struts configuration it tries to initialize the spring beans. This does work because "request" scope does not exist at the time the struts config is created.
> The enclosed patch simply removes the eager-loading since it is only done as an optimization (and maybe eager early consistency check). It would be possible to make this a flag although I really think the default should be "off"; the "off" behavior is consistent with behavior of "older" struts technologies in this respectearlier struts versions..

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


[jira] Resolved: (WW-3407) Convention plugin eager-loads spring components upon initialization of convention configuration

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3407.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0
         Assignee: Lukasz Lenart

Resolved, thanks for path! I added special flag to turn on/off eager loading - by default off.

struts.convention.action.eagerLoading -> http://cwiki.apache.org/confluence/display/WW/Convention+Plugin


> Convention plugin eager-loads spring components upon initialization of convention configuration
> -----------------------------------------------------------------------------------------------
>
>                 Key: WW-3407
>                 URL: https://issues.apache.org/jira/browse/WW-3407
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.1.8.1, 2.2.0
>         Environment: spring 2.5+
>            Reporter: Kristian Rosenvold
>            Assignee: Lukasz Lenart
>             Fix For: 2.2.0
>
>         Attachments: strutsConventionEagerloading.patch
>
>
> Our action classes have their life cycle managed by spring, and they are /request/ scoped. When the convention plugin initializes the struts configuration it tries to initialize the spring beans. This does work because "request" scope does not exist at the time the struts config is created.
> The enclosed patch simply removes the eager-loading since it is only done as an optimization (and maybe eager early consistency check). It would be possible to make this a flag although I really think the default should be "off"; the "off" behavior is consistent with behavior of "older" struts technologies in this respectearlier struts versions..

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