myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2730) FacesContext not available on application startup
Date Thu, 24 Jun 2010 09:22:54 GMT

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

Jakob Korherr commented on MYFACES-2730:
----------------------------------------

Hi Leo,

Yes, great!! Now you see my point :) :)

As you can see, I explained that in one of my very first posts to this issue: "Since FacesContext
and ExternalContext are now available at system startup and shutdown, we could get rid of
some previous hacks. One of them (the biggest) was in AbstractFacesInitializer and caused
some problems like MYFACES-2520, because it used the FacesContextFactory and dummy Request-
and Response classes to get a FacesContext instance for the system event management (MyFaces
core itself does not access the request and response objects directly in FacesContextFactoryImpl,
but Trinidad does and this caused some problems). Also those dummy classes caused some Servlet
3.0 related problems. With this solution in place, I could remove this code completely."

That's why I did not understand why you always talked about the problems with Factories. Sorry
- I should have recognized this earlier.

So I am now (finally) in favour of committing your proposed patch, with one minor adjustment
though: In AbstractFacesInitializer you can remove the code that installs the DebugPhaseListener
(lifecycle.addPhaseListener(new DebugPhaseListener());), because with the StartupFacesContextImpl
in place, this will happen in FacesConfigurator when the lifecycle is initialized. You can
also take a look at my first solution to see this minor change.

I hope you don't hate me too much for this loong discussion.. ;)

Regards,
Jakob

> FacesContext not available on application startup
> -------------------------------------------------
>
>                 Key: MYFACES-2730
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2730
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-127, JSR-252, JSR-314
>    Affects Versions: 1.1.8, 1.2.9, 2.0.0
>            Reporter: Nick Belaevski
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.2-SNAPSHOT
>
>         Attachments: MYFACES-2730-1.patch, MYFACES-2730-2.patch, MYFACES-2730-3.patch,
MYFACES-2730-4.patch, MYFACES-2730-revert.patch
>
>
> If custom ResourceHandler calls FacesContext.getCurrentInstance() in constructor to read
init parameters, null value is returned. This affects latest MyFaces 2.0.0-SNAPSHOT. Mojarra
2.0 provides InitFacesContext in this case.

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


Mime
View raw message