[
https://jira.jboss.org/jira/browse/JBSEAM-3273?page=com.atlassian.jira.pl...
]
Przemyslaw Jaskierski updated JBSEAM-3273:
------------------------------------------
Attachment: issueDemo.war
1. Deploy this war on Tomcat 6.0.18/6.0.16 on Java 6 JRE
2. invoke
http://localhost:8080/issueDemo/test.xhtml
3. In catalina.out there is System.out.println displaying headers read from FacesContext
in @Create method
See next attachment for the source of SessionStartupBean.
Seam bundled in this WAR is 2.0.3.RC1. You can just fill lib directory with full Seam
2.0.3.CR1's jars - I threw away all not needed jars from this WAR.
@Startup + @Create on session-scoped bean broken in Seam 2.1
------------------------------------------------------------
Key: JBSEAM-3273
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3273
Project: Seam
Issue Type: Bug
Environment: clean Tomcat 6.0.16, Seam 2.1 build 281
Reporter: Przemyslaw Jaskierski
Assignee: Shane Bryzak
Priority: Critical
Fix For: 2.1.0.CR1
Attachments: issueDemo.war
In 1.x, 2.x and Seam 2.1 build from ~march 2008 it was possible to access, for example,
cookies info or other http request attributes at session creation time. It was extremely
useful to fetch f.e. user-specific data from database to create custom view etc,
(described f.e. here
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963032). It is not
working anymore. Both FacesContext.getCurrentInstance() and
ServletContexts.getInstance().getRequest() now return null within @Create method.
@Name("sessionStateBacker")
@Scope(ScopeType.SESSION)
@Startup
public class UserStateBacker
implements Serializable
{
@Create
public void sessionCreated()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null) {
System.out.println("FacesContext is null in 2.1.0 but worked fine in
2.0.3");
}
//facesContext.getExternalContext().getRequestCookieMap();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira