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/19 17:28:57 UTC
[jira] [Created] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
----------------------------------------------------------------------------------------------------
Key: EXTCDI-208
URL: https://issues.apache.org/jira/browse/EXTCDI-208
Project: MyFaces CODI
Issue Type: Improvement
Affects Versions: 1.0.0
Environment: codi 1.0.0
Reporter: Martin Kočí
Priority: Minor
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068378#comment-13068378 ]
Gerhard Petracek commented on EXTCDI-208:
-----------------------------------------
it was done that way because you need to inject something in DefaultErrorViewExceptionHandler which has to dyn. wrap the created exception-handler. however, we could do that lazily if you noticed a big impact.
> CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
> ----------------------------------------------------------------------------------------------------
>
> Key: EXTCDI-208
> URL: https://issues.apache.org/jira/browse/EXTCDI-208
> Project: MyFaces CODI
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Environment: codi 1.0.0
> Reporter: Martin Kočí
> Priority: Minor
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
> ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068374#comment-13068374 ]
Gerhard Petracek commented on EXTCDI-208:
-----------------------------------------
it was done that way because i saw different instances even within a request. but i can't remember the setup. however, it shouldn't be called that often within a request and the injection process isn't expansive esp. due to the @Advanced check (which is the default behaviour). an alternative which would be safe as well is lazy injection directly in DefaultErrorViewExceptionHandler.
> CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
> ----------------------------------------------------------------------------------------------------
>
> Key: EXTCDI-208
> URL: https://issues.apache.org/jira/browse/EXTCDI-208
> Project: MyFaces CODI
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Environment: codi 1.0.0
> Reporter: Martin Kočí
> Priority: Minor
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
> ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068388#comment-13068388 ]
Martin Kočí commented on EXTCDI-208:
------------------------------------
My test is is pretty virtual - no real performance problem. I only noticed unexpected number of invocation of CodiUtils.injectFields - in my test case I call facesContext.getExceptionHandler() 1000x
> CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
> ----------------------------------------------------------------------------------------------------
>
> Key: EXTCDI-208
> URL: https://issues.apache.org/jira/browse/EXTCDI-208
> Project: MyFaces CODI
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Environment: codi 1.0.0
> Reporter: Martin Kočí
> Priority: Minor
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
> ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078747#comment-13078747 ]
Martin Kočí commented on EXTCDI-208:
------------------------------------
Thanks Gerhard, it works for me.
> CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
> ----------------------------------------------------------------------------------------------------
>
> Key: EXTCDI-208
> URL: https://issues.apache.org/jira/browse/EXTCDI-208
> Project: MyFaces CODI
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Environment: codi 1.0.0
> Reporter: Martin Kočí
> Priority: Minor
> Attachments: EXTCDI-208.patch
>
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
> ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (EXTCDI-208)
CodiFacesContextWrapper.getExceptionHandler() tries to inject many times
during one request/response
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek resolved EXTCDI-208.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.1
thx to martin for testing it
> CodiFacesContextWrapper.getExceptionHandler() tries to inject many times during one request/response
> ----------------------------------------------------------------------------------------------------
>
> Key: EXTCDI-208
> URL: https://issues.apache.org/jira/browse/EXTCDI-208
> Project: MyFaces CODI
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Environment: codi 1.0.0
> Reporter: Martin Kočí
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: EXTCDI-208.patch
>
>
> org.apache.myfaces.extensions.cdi.jsf2.impl.listener.request.CodiFacesContextWrapper.getExceptionHandler() tries to inject field always - in every method call.
> ExceptionHandler instance has request scoped lifespan and it cannot change - I think is suitable to inject fields only once.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira