You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wendy Smoak (JIRA)" <ji...@apache.org> on 2006/11/15 21:32:57 UTC

[jira] Created: (WW-1507) Initialization happens twice

Initialization happens twice
----------------------------

                 Key: WW-1507
                 URL: http://issues.apache.org/struts/browse/WW-1507
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.2
            Reporter: Wendy Smoak
            Priority: Minor


The Spring integration plugin and "zero config" Action class discovery seem to initialize twice.

After application startup, before visiting a page:

2006-11-15 13:11:34,692  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
2006-11-15 13:11:34,692  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
2006-11-15 13:11:34,707  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
2006-11-15 13:11:35,192  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@1bdc9d8
2006-11-15 13:11:35,192 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction

After visiting a page:

2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
2006-11-15 13:12:46,523  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
2006-11-15 13:12:46,601  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@77eaf8
2006-11-15 13:12:46,601 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction

Visiting more pages does not cause them to initialize again.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1507) Initialization happens twice

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1507?page=comments#action_38708 ] 
            
Wendy Smoak commented on WW-1507:
---------------------------------

Related thread: http://www.nabble.com/Plugins-and-zero-config-initializing-twice--t2638679.html

Don mentioned, "it seems it thinks struts-default.xml has changed...there could be either a reset of the FileManager somewhere or it isn't properly marked when first loaded."

> Initialization happens twice
> ----------------------------
>
>                 Key: WW-1507
>                 URL: http://issues.apache.org/struts/browse/WW-1507
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>            Reporter: Wendy Smoak
>            Priority: Minor
>
> The Spring integration plugin and "zero config" Action class discovery seem to initialize twice.
> After application startup, before visiting a page:
> 2006-11-15 13:11:34,692  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
> 2006-11-15 13:11:34,692  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
> 2006-11-15 13:11:34,707  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
> 2006-11-15 13:11:35,192  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@1bdc9d8
> 2006-11-15 13:11:35,192 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction
> After visiting a page:
> 2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
> 2006-11-15 13:12:46,523  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
> 2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
> 2006-11-15 13:12:46,601  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@77eaf8
> 2006-11-15 13:12:46,601 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction
> Visiting more pages does not cause them to initialize again.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WW-1507) Initialization happens twice

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1507?page=all ]

Don Brown resolved WW-1507.
---------------------------

    Fix Version/s: 2.0.2
       Resolution: Fixed
         Assignee: Don Brown

Fixed.  The problem was the FileManager, which tracks when to reload files, defaulted to not reload.  When not reloading, it doesn't remember the last revision of the files, so on the first call, it returned the files w/o recording their last modified date.  This happened before the reload setting had been applied.  Once it had been applied, the second call didn't see any previous revision so it assumed it needed to be reloaded.  When reloaded, it then remembered the last revision and never needed it again without cause.

The fix in XWork was to default to reloading until told otherwise.

> Initialization happens twice
> ----------------------------
>
>                 Key: WW-1507
>                 URL: http://issues.apache.org/struts/browse/WW-1507
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>            Reporter: Wendy Smoak
>         Assigned To: Don Brown
>            Priority: Minor
>             Fix For: 2.0.2
>
>
> The Spring integration plugin and "zero config" Action class discovery seem to initialize twice.
> After application startup, before visiting a page:
> 2006-11-15 13:11:34,692  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
> 2006-11-15 13:11:34,692  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
> 2006-11-15 13:11:34,707  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
> 2006-11-15 13:11:35,192  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@1bdc9d8
> 2006-11-15 13:11:35,192 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction
> After visiting a page:
> 2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:62) - Initializing Struts-Spring integration...
> 2006-11-15 13:12:46,523  INFO (com.opensymphony.xwork2.spring.SpringObjectFactory:71) - Setting autowire strategy to name
> 2006-11-15 13:12:46,523  INFO (org.apache.struts2.spring.StrutsSpringObjectFactory:94) - ... initialized Struts-Spring integration successfully
> 2006-11-15 13:12:46,601  INFO (com.opensymphony.xwork2.util.ResolverUtil:282) - Scanning for classes in [/path/to/ssr-s2jt/target/tomcat5x/webapps/ssr-s2jt/WEB-INF/classes/edu/asu/vpia/ssr/actions/] matching criteria: org.apache.struts2.config.ClasspathConfigurationProvider$1@77eaf8
> 2006-11-15 13:12:46,601 DEBUG (org.apache.struts2.config.ClasspathConfigurationProvider:163) - Processing class edu.asu.vpia.ssr.actions.FindAlumniAction
> Visiting more pages does not cause them to initialize again.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira