[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3273) @Startup + @Create on session-scoped bean broken in Seam 2.1
by Przemyslaw Jaskierski (JIRA)
@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
Priority: Critical
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3365) On-session-creation access to Contexts, HttpServletRequest, Hibernate Session (e.g. @Startup+@Create in session-scoped bean) - now works partially
by Przemyslaw Jaskierski (JIRA)
On-session-creation access to Contexts, HttpServletRequest, Hibernate Session (e.g. @Startup+@Create in session-scoped bean) - now works partially
--------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3365
URL: https://jira.jboss.org/jira/browse/JBSEAM-3365
Project: Seam
Issue Type: Feature Request
Affects Versions: 2.1.0.BETA1
Environment: Tomcat 6.x / all supported platforms
Reporter: Przemyslaw Jaskierski
This is a follow up to linked bug report JBSEAM-3273. Filling this as requested by Shane.
Example scenario: Developer wants to initialize or fetch from database properties for user who has just created a http session. Developer can grab a cookie from request, identify user using it and read basic properties to customize user experience by initializing some session-scoped beans which determine application behavior.
@Startup-annotated-session-scoped-bean's @Create method is IMHO a good place for this.
It would be great if it was resolved for Seam 2.1 release, as this version brings redesigns in many crucial parts. Some slight lifecycle altering can possibly be needed.
Currently this can be achieved but only in a hacky way, using workaround in Seam 2.1. According to Shane, Seam makes no guarantee that it works, anyway. In Seam 2.1 you have to add <web:identity-filter disabled="true"/> to components.xml to have something similar possible (this workaround was suggested by Shane in resolution to linked JBSEAM-3273). This was possible in Seam 2.x without this workaround, but Dan's IdentityFilter introduction in Seam 2.1 made it cease working.
To sum this up, it would be great if there was a way to make this possible in one place:
a. Executed _exactly_once_ at http session creation
b. access to cookies, request parameters etc. (e.g. FacesContext.getCurrentInstance() or ServletContexts.getInstance().getRequest())
c. Session and other contexts available for setting up beans for every user activity from now on.
d. managed hibernate session available
--
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3364) stacktrace _very_ confusing
by arne anka (JIRA)
stacktrace _very_ confusing
---------------------------
Key: JBSEAM-3364
URL: https://jira.jboss.org/jira/browse/JBSEAM-3364
Project: Seam
Issue Type: Bug
Affects Versions: 2.0.2.SP1
Environment: jboss server 4.2.2.GA, eclipse 3.4 linux 32bit
Reporter: arne anka
the stacktraces are
a) too long
b) redundant
c) sometimes totally useless
b) the same information is shown again and again and again. but the really useful part (where it happens in _my_ code) is far far down and often rather hard to find. i think it would be sensible to re-organize the chain of exception throwing so that the exception from the project is on top and that not every level prints the same stacktrace over again.
c) the other day i had a stacktrace that contained no information whatsoever (only the name of my xhtml), no linenumber, nothing.
since i knew that it only could be caused by an empty id attribute (id="") i was able to fix that -- but that's pure coincidence. if seam knows what's wrong (and it has to, else no exception would have been thrown), it should under all circumstaces put out that information instead of a windows like "an error occured"
see JBIDE-2631 for two stacktraces illustrating the issue.
--
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
16 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3348) StatusMessages discards all messages issued without a resource bundle key
by Stefano Travelli (JIRA)
StatusMessages discards all messages issued without a resource bundle key
-------------------------------------------------------------------------
Key: JBSEAM-3348
URL: https://jira.jboss.org/jira/browse/JBSEAM-3348
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.0.BETA1
Environment: Ubuntu 8.04, JVM 1.6.0_06, JBoss 4.2.2
Reporter: Stefano Travelli
This is a regression after JBSEAM-3318.
StatusMessages.add(messageTemplate, params..) and StatusMessages.add(severity, messageTemplate, params..) delegate the message to add(severity, key, detailKey, messageTemplate, messageDetailTemplate, params..) with null for 'key'.
However the code discards the message if key is null (or empty) so that no message is added.
--
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
16 years, 4 months