[ 
https://issues.apache.org/jira/browse/MYFACES-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993277#comment-12993277
 ] 

Scott O'Bryan commented on MYFACES-3039:
----------------------------------------

Ahhh yes.  Mike, you're one hundred percent right.  Pre-JSF 2.0 I don't think 
we delegated because there was no concept of an ExternalContextFactory.  That 
was set up by the FacesContextFactory.  Now, however, the 
ExternalContextFactory is the "hook point" for the container abstraction.  
Simply put the FacesContextFactory should not care what objects back the 
ExternalContext so long as the contracts are followed and, looking at the code 
above, it is unclear to me why the check is even there.

I suspect that its there because FacesContext used to instantiate 
externalContext itself (and there clearly used to be a cast to the native 
objects)..

So yeah, the FacesContext and Factory should be container agnostic for JSF 2.0.

> MyFaces broken in Portlet environment:  Fails to support extendable 
> FacesContextFactory/FacesContext/ExternalContext
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3039
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3039
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Michael Freedman
>
> JSF 2.0 improved the definition/handling of the instantiation of the 
> FacesContext allowing non-servlet environments to wrap the base/core impl.  
> This was done because most of the FacesContext apis are inherently runtime 
> environment neutral -- allowing the portlet bridge to not have to 
> duplicate/reimplement and maybe get wrong base core function.  Unfortunately 
> MyFaces doesn't conform to this change and hence the Portlet Bridge can't run 
> in the MyFaces environment.  
> Basically the bridge expects to be able to delegate from its 
> FacesContextFactoryImpl.getFacesContext and then wrap the returned 
> FacesContext with its own.  This requires the underlying core impl to be 
> runtime (servlet/portlet) neutral during the creation process.  The bridge 
> will wrap the FacesContext and supply its own ExternalContext such that  any 
> servlet dependent impl in the core FacesContext/ExternalContext will be 
> hidden by overrides.
> FYI ... until this is addressed I can't begin any testing of the bridge on 
> MyFaces.

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

        

Reply via email to