ICEfaces
  1. ICEfaces
  2. ICE-5801

Provide configuration for ICEpush to be always active

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.1-Beta, 3.0
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2 ICEpush
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      Currently, ICEpush is generally active on a per page basis and initialized in a lazy fashion. It should be possible to configure ICEfaces to always be active and non-lazy - this would more closely match the old ICEfaces 1.x behaviour. Per-page configuration would still allow ICEpush to be turned off.

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          I'd added configuration parameters that allow ICEpush to be configured so that it starts up in a non-lazy fashion. There is a context parameter that applies globally and that defaults to true (ie Push is started lazily). Setting to false tells ICEfaces that each view should automatically have ICEpush started up on the initial page load rather than waiting for the first Push request from the application:

          <context-param>
          <param-name>org.icefaces.lazyPush</param-name>
          <param-value>false</param-value>
          </context-param>

          There is also an attribute for the ice:config tag that allows page-level configuration. This take precedence over the context parameter setting.

          <ice:config lazyPush="false"/>

          Show
          Deryk Sinotte added a comment - I'd added configuration parameters that allow ICEpush to be configured so that it starts up in a non-lazy fashion. There is a context parameter that applies globally and that defaults to true (ie Push is started lazily). Setting to false tells ICEfaces that each view should automatically have ICEpush started up on the initial page load rather than waiting for the first Push request from the application: <context-param> <param-name>org.icefaces.lazyPush</param-name> <param-value>false</param-value> </context-param> There is also an attribute for the ice:config tag that allows page-level configuration. This take precedence over the context parameter setting. <ice:config lazyPush="false"/>
          Hide
          Ken Fyten added a comment -

          Suggest we change the name of this config. to something "positive", instead of the double-negative nature of "lazyPush=false". According to Wikipedia, the opposite of lazy loading is eager loading, so how about: "eagerPushInit=true" to enable this mode.

          Show
          Ken Fyten added a comment - Suggest we change the name of this config. to something "positive", instead of the double-negative nature of "lazyPush=false". According to Wikipedia, the opposite of lazy loading is eager loading, so how about: "eagerPushInit=true" to enable this mode.
          Hide
          Ken Fyten added a comment -

          Seems like this needs further review:

          • What are the legit use-cases for this mode? (async notification of session-expiry, outputConnectionStatus support the same as in 1.8, etc.)
          • Needs to be comprehensive. It not only needs to init. push immediately, but also needs to ensure that push isn't later shutdown if the session is removed from the push manager.
          Show
          Ken Fyten added a comment - Seems like this needs further review: What are the legit use-cases for this mode? (async notification of session-expiry, outputConnectionStatus support the same as in 1.8, etc.) Needs to be comprehensive. It not only needs to init. push immediately, but also needs to ensure that push isn't later shutdown if the session is removed from the push manager.
          Hide
          Ted Goddard added a comment -

          Note that using ICEpush for session expiry notification is more heavy than necessary. Sessions typically expire within predictable time intervals. A timer could be maintained by the client; when the time elapsed, the client would ask the server for the remaining time in the session (without extending the session timeout) and display the dialog. For cases that required spontaneous notification of session expiry (such as "you are already logged in from another system") push could be configured as above to support this.

          Show
          Ted Goddard added a comment - Note that using ICEpush for session expiry notification is more heavy than necessary. Sessions typically expire within predictable time intervals. A timer could be maintained by the client; when the time elapsed, the client would ask the server for the remaining time in the session (without extending the session timeout) and display the dialog. For cases that required spontaneous notification of session expiry (such as "you are already logged in from another system") push could be configured as above to support this.
          Hide
          Ken Fyten added a comment -

          Mircea, please review what's been done. Seems like all we need to complete this is to add the code to prevent the push manager from shutting down push when the last session is removed.

          Show
          Ken Fyten added a comment - Mircea, please review what's been done. Seems like all we need to complete this is to add the code to prevent the push manager from shutting down push when the last session is removed.
          Hide
          Mircea Toma added a comment -

          The "lazyPush" feature seems to be completed. By default the blocking connection is started only when needed. When there are no more windows that require push notifications then the blocking connection shuts down. This "lazy" behavior is intended since some applications (mobile?) rely on it.
          Once the "lazyPush" is turned off (set to false) either in web.xml or per page using ice:config tag the blocking connection is started when the window loads up, and it remains enabled.

          Show
          Mircea Toma added a comment - The "lazyPush" feature seems to be completed. By default the blocking connection is started only when needed. When there are no more windows that require push notifications then the blocking connection shuts down. This "lazy" behavior is intended since some applications (mobile?) rely on it. Once the "lazyPush" is turned off (set to false) either in web.xml or per page using ice:config tag the blocking connection is started when the window loads up, and it remains enabled.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: