Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta
-
Fix Version/s: 2.0.0
-
Component/s: Push Library
-
Labels:None
-
Environment:IE8, CDI
-
Affects:Compatibility/Configuration
Description
Tested on JBoss AS 6 M3. Updates on Chrome, not on IE8. Works for @ManagedBean @ApplicationScoped (JSF) but not for @ApplicationScoped @Named (CDI)
-
Hide
- pushbug.zip
- 632 kB
- Nicklas Karlsson
-
- pushbug/.classpath 0.7 kB
- pushbug/.project 0.5 kB
- pushbug/.../org.eclipse.jdt.core.prefs 0.3 kB
- pushbug/.../org.maven.ide.eclipse.prefs 0.3 kB
- pushbug/pom.xml 2 kB
- pushbug/src/main/.../icefaces/PushBug.java 0.8 kB
- pushbug/src/main/webapp/bug.xhtml 0.6 kB
- pushbug/src/main/.../WEB-INF/beans.xml 0.3 kB
- pushbug/src/.../WEB-INF/faces-config.xml 4 kB
- pushbug/src/main/webapp/WEB-INF/web.xml 0.4 kB
- pushbug/target/.../icefaces/PushBug.class 1 kB
- pushbug/target/.../pom.properties 0.1 kB
- pushbug/.../pushbugs-0.0.1-SNAPSHOT.war 312 kB
- pushbug/target/.../bug.xhtml 0.6 kB
- pushbug/target/.../WEB-INF/beans.xml 0.3 kB
- pushbug/target/.../icefaces/PushBug.class 1 kB
- pushbug/target/.../WEB-INF/faces-config.xml 4 kB
- pushbug/target/.../lib/icefaces-2.0-A3.jar 164 kB
- pushbug/target/.../lib/icepush-2.0-A3.jar 171 kB
- pushbug/target/.../WEB-INF/web.xml 0.4 kB
- pushbug/target/war/work/webapp-cache.xml 2 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
This is an application bug. The application makes use of an ApplicationScoped bean with initialization function:
@PostConstruct
public void init()
Since the bean is ApplicationScoped, addCurrentSession() will be called only for the first user that causes this bean to be lazily instantiated, and only that user will have their session added to the "bug" render group.
Two fairly simple fixes are possible:
- call addCurrentSession() from an ApplicationScoped method called by all sessions, such as getText(). This is slightly inefficient because each session will be added upon each page render (but it's nothing more than touching an entry in a Hashtable, so it's certainly not too inefficient for a small demo)
- introduce a SessionScoped bean that calls addCurrentSession() in the @PostConstruct
Application changes verified on JBoss AS 6 M3 with IE8. I believe the original suspicion around IE8 is due to the transient nature of the bug whereby push is functional only for the first connected user.
Show
Ted Goddard
added a comment - This is an application bug. The application makes use of an ApplicationScoped bean with initialization function:
@PostConstruct
public void init()
{
PushRenderer.addCurrentSession("bug");
}
Since the bean is ApplicationScoped, addCurrentSession() will be called only for the first user that causes this bean to be lazily instantiated, and only that user will have their session added to the "bug" render group.
Two fairly simple fixes are possible:
call addCurrentSession() from an ApplicationScoped method called by all sessions, such as getText(). This is slightly inefficient because each session will be added upon each page render (but it's nothing more than touching an entry in a Hashtable, so it's certainly not too inefficient for a small demo)
introduce a SessionScoped bean that calls addCurrentSession() in the @PostConstruct
Application changes verified on JBoss AS 6 M3 with IE8. I believe the original suspicion around IE8 is due to the transient nature of the bug whereby push is functional only for the first connected user.
Reported in Niklas' blog: http://in.relation.to/Bloggers/AHitchhikersGuideToJavaEE6ApplicationSetupPartII