ICEpush
  1. ICEpush
  2. PUSH-96

PushRenderer not working with IE8 and CDI style @ApplicationScoped @Named beans

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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)

        Activity

        Hide
        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.

        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.
        Show
        Ted Goddard added a comment - Reported in Niklas' blog: http://in.relation.to/Bloggers/AHitchhikersGuideToJavaEE6ApplicationSetupPartII

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Nicklas Karlsson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: