This content has been marked as final.
Show 2 replies
-
1. Re: Potential Bug, HotDeployFilter AND Pages
pmuir May 20, 2008 12:40 PM (in response to pieter.martin)Please file an issue in JIRA
Hi
I am working on a svn trunk of Seam 2.1.0.
We have multiple wars in the ear file. When navigating from one page to another the navigation rule does not get applied.
After some investigation it appears that the HotDeployFilter is the culprit. On line 59 it refreshes Pages.
Pages pages = (Pages) getServletContext().getAttribute(Seam.getComponentName(Pages.class)); if (pages!= null) { pages.initialize(); }
The problem is that the context have not been initialized. So then during pages.initialize() when the pages file is being loaded using the ResourceLoader
public static ResourceLoader instance() { if (!Contexts.isApplicationContextActive()) { return new ResourceLoader(); } else { return (ResourceLoader) Component.getInstance(ResourceLoader.class, ScopeType.STATELESS); } }
Contexts.isApplicationContextActive() returns false
The new ResourceLoader() then uses the incorrect pages file. It does not use the pages file for the war file that is currently the context.
If Contexts.isApplicationContextActive() returned true then
return (ResourceLoader) Component.getInstance(ResourceLoader.class, ScopeType.STATELESS);
would return the faces resource loader
org.jboss.seam.faces.ResourceLoader
This problem is not in Seam 2.0.1 as The HotDeployFilter does not call pages.initialize();
I think Pages gets initialized via the SeamPhaseListener which would have restored the contexts before initializing Pages.
I changed the HotDeployFilter back to like Seam 2.0.1 and then the page navigation works fine.
Cheers
Pieter
Please file an issue in JIRA