You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kočí (JIRA)" <de...@myfaces.apache.org> on 2011/07/28 15:43:10 UTC

[jira] [Created] (MYFACES-3250) [perf] review StartupServletContextListener if HttpSessionAttributeListener is required

[perf] review StartupServletContextListener if HttpSessionAttributeListener is required
---------------------------------------------------------------------------------------

                 Key: MYFACES-3250
                 URL: https://issues.apache.org/jira/browse/MYFACES-3250
             Project: MyFaces Core
          Issue Type: Improvement
         Environment: myfaces trunk,  tomcat 6.0.26
            Reporter: Martin Kočí
            Priority: Minor


When running stress test this is one of the most BLOCKED thread (blocked on some ArrayList monitor in tomcat internals):
org.apache.catalina.core.ContainerBase.fireContainerEvent(String, Object)
   org.apache.catalina.session.StandardSession.fireContainerEvent(Context, String, Object)
      org.apache.catalina.session.StandardSession.setAttribute(String, Object, boolean)
         org.apache.catalina.session.StandardSession.setAttribute(String, Object)
            org.apache.catalina.session.StandardSessionFacade.setAttribute(String, Object)	
               org.apache.myfaces.context.servlet.SessionMap.setAttribute(String, Object)
                  org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(String, Object)
                     org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)

This happens when someone puts a attribute into httpSession:
org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
  org.apache.myfaces.renderkit.ServerSideStateCacheImpl.nextViewSequence(FacesContext)
  org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.getResponseEncoding(FacesContext, String)	
  org.apache.myfaces.renderkit.ServerSideStateCacheImpl.saveSerializedViewInServletSession(FacesContext, 

then Servlet container delivers event HttpSessionBindingEvent.

in myfaces HttpSessionAttributeListener in implemented by oam.StartupServletContextListener and handles some stuff for managed beans. 
Review if this is needed - ideally remove it.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3250) [perf] review StartupServletContextListener if HttpSessionAttributeListener is required

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072360#comment-13072360 ] 

Martin Kočí commented on MYFACES-3250:
--------------------------------------

Yes, the purpose is clear. I didn't mean to remove @PreDestroy functionality, only find a way how to not register this HttpSessionAttributeListener if no managed beans are used. This can be considered as part of [1]  and will improve performance when running modern stack like CDI.

[1] http://www.mail-archive.com/dev@myfaces.apache.org/msg49177.html

> [perf] review StartupServletContextListener if HttpSessionAttributeListener is required
> ---------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3250
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3250
>             Project: MyFaces Core
>          Issue Type: Improvement
>         Environment: myfaces trunk,  tomcat 6.0.26
>            Reporter: Martin Kočí
>            Priority: Minor
>
> When running stress test this is one of the most BLOCKED thread (blocked on some ArrayList monitor in tomcat internals):
> org.apache.catalina.core.ContainerBase.fireContainerEvent(String, Object)
>    org.apache.catalina.session.StandardSession.fireContainerEvent(Context, String, Object)
>       org.apache.catalina.session.StandardSession.setAttribute(String, Object, boolean)
>          org.apache.catalina.session.StandardSession.setAttribute(String, Object)
>             org.apache.catalina.session.StandardSessionFacade.setAttribute(String, Object)	
>                org.apache.myfaces.context.servlet.SessionMap.setAttribute(String, Object)
>                   org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(String, Object)
>                      org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
> This happens when someone puts a attribute into httpSession:
> org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.nextViewSequence(FacesContext)
>   org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.getResponseEncoding(FacesContext, String)	
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.saveSerializedViewInServletSession(FacesContext, 
> then Servlet container delivers event HttpSessionBindingEvent.
> in myfaces HttpSessionAttributeListener in implemented by oam.StartupServletContextListener and handles some stuff for managed beans. 
> Review if this is needed - ideally remove it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3250) [perf] review StartupServletContextListener if HttpSessionAttributeListener is required

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072374#comment-13072374 ] 

Jakob Korherr commented on MYFACES-3250:
----------------------------------------

OK, nice. I would really like to see a prototype for the DISABLE_MANAGED_BEANS options with regard to the "Deprecate managed bean mechanism"-discussion for JSF 2.2.

> [perf] review StartupServletContextListener if HttpSessionAttributeListener is required
> ---------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3250
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3250
>             Project: MyFaces Core
>          Issue Type: Improvement
>         Environment: myfaces trunk,  tomcat 6.0.26
>            Reporter: Martin Kočí
>            Priority: Minor
>
> When running stress test this is one of the most BLOCKED thread (blocked on some ArrayList monitor in tomcat internals):
> org.apache.catalina.core.ContainerBase.fireContainerEvent(String, Object)
>    org.apache.catalina.session.StandardSession.fireContainerEvent(Context, String, Object)
>       org.apache.catalina.session.StandardSession.setAttribute(String, Object, boolean)
>          org.apache.catalina.session.StandardSession.setAttribute(String, Object)
>             org.apache.catalina.session.StandardSessionFacade.setAttribute(String, Object)	
>                org.apache.myfaces.context.servlet.SessionMap.setAttribute(String, Object)
>                   org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(String, Object)
>                      org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
> This happens when someone puts a attribute into httpSession:
> org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.nextViewSequence(FacesContext)
>   org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.getResponseEncoding(FacesContext, String)	
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.saveSerializedViewInServletSession(FacesContext, 
> then Servlet container delivers event HttpSessionBindingEvent.
> in myfaces HttpSessionAttributeListener in implemented by oam.StartupServletContextListener and handles some stuff for managed beans. 
> Review if this is needed - ideally remove it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3250) [perf] review StartupServletContextListener if HttpSessionAttributeListener is required

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072352#comment-13072352 ] 

Jakob Korherr commented on MYFACES-3250:
----------------------------------------

this listener is needed to properly call @PreDestroy annotated methods of @SessionScoped managed beans!

> [perf] review StartupServletContextListener if HttpSessionAttributeListener is required
> ---------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3250
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3250
>             Project: MyFaces Core
>          Issue Type: Improvement
>         Environment: myfaces trunk,  tomcat 6.0.26
>            Reporter: Martin Kočí
>            Priority: Minor
>
> When running stress test this is one of the most BLOCKED thread (blocked on some ArrayList monitor in tomcat internals):
> org.apache.catalina.core.ContainerBase.fireContainerEvent(String, Object)
>    org.apache.catalina.session.StandardSession.fireContainerEvent(Context, String, Object)
>       org.apache.catalina.session.StandardSession.setAttribute(String, Object, boolean)
>          org.apache.catalina.session.StandardSession.setAttribute(String, Object)
>             org.apache.catalina.session.StandardSessionFacade.setAttribute(String, Object)	
>                org.apache.myfaces.context.servlet.SessionMap.setAttribute(String, Object)
>                   org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(String, Object)
>                      org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
> This happens when someone puts a attribute into httpSession:
> org.apache.myfaces.util.AbstractThreadSafeAttributeMap.put(Object, Object)
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.nextViewSequence(FacesContext)
>   org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.getResponseEncoding(FacesContext, String)	
>   org.apache.myfaces.renderkit.ServerSideStateCacheImpl.saveSerializedViewInServletSession(FacesContext, 
> then Servlet container delivers event HttpSessionBindingEvent.
> in myfaces HttpSessionAttributeListener in implemented by oam.StartupServletContextListener and handles some stuff for managed beans. 
> Review if this is needed - ideally remove it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira