Clean up initialization code and add tests for StartupServletContextListener
and MyFacesServlet
-----------------------------------------------------------------------------------------------
Key: MYFACES-2785
URL: https://issues.apache.org/jira/browse/MYFACES-2785
Project: MyFaces Core
Issue Type: Task
Components: JSR-314
Affects Versions: 2.0.1-SNAPSHOT
Reporter: Jakob Korherr
Assignee: Jakob Korherr
Some major code clean up on the initialization of MyFaces:
- The solution for startup and shutdown FacesContext implementations
(MYFACES-2730) introduced some duplicate code on StartupFacesContextImpl and
FacesContextImpl. This can be solved by providing a base implementation class
(like the one in for StartupExternalContext). This will make maintaining the
two FacesContext implementation very easy, because there are no duplicate
methods (except for getViewRoot() on StartupFacesContextImpl).
- JUnit tests are needed to verify the behavior of
StartupServletContextListener and MyFacesServlet and to check if the
FacesContext is available on startup and shutdown
- AbstractFacesInitializer should provide a static method to get the right
FacesInitializer impl instead of having several duplicate methods in
StartupServletContextListener and MyFacesServlet that do nothing but getting
the right impl and invoking some method on it.
- AbstractFacesInitializer.dispatchInitDestroyEvent should use the application
object from the StartupFacesContextImpl and not directly from the factory
- AbstractFacesInitializer.getLifecycleId() is unused because of MYFACES-2730
- initStartupFacesContext() and initShutdownFacesContext() should set the field
startup correctly (true or false) and should not create the UIViewRoot directly
(it should be created in StartupFacesContextImpl at first access)
- minor javadoc copy and paste error on FacesInitializer
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.