ICEfaces
  1. ICEfaces
  2. ICE-5787

Simplify dispatch infrastructure

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description


      It is likely that the following classes can be simplified considerably in ICEfaces 2.0 since JSF provides dispatching through the resource handler mechanism:

             core/src/main/java/org/icefaces/push/SessionBoundServer.java
             core/src/main/java/org/icefaces/push/DynamicResourceDispatcher.java
             core/src/main/java/org/icefaces/push/servlet/ICEfacesResourceHandler.java
             core/src/main/java/org/icefaces/push/servlet/SessionDispatcher.java
             core/src/main/java/org/icefaces/push/SessionViewManager.java

        Issue Links

          Activity

          Ted Goddard created issue -
          Ted Goddard made changes -
          Field Original Value New Value
          Assignee Mircea Toma [ mircea.toma ]
          Mircea Toma made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta [ 10231 ]
          Hide
          Mircea Toma added a comment -

          Try to remove ThreadLocal-s and threads.

          Show
          Mircea Toma added a comment - Try to remove ThreadLocal-s and threads.
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0.0 [ 10230 ]
          Fix Version/s 2.0-Beta [ 10231 ]
          Hide
          Ted Goddard added a comment -

          ICEfacesResourceHandler.java appears to contain unused Servlet-specific code.

          Show
          Ted Goddard added a comment - ICEfacesResourceHandler.java appears to contain unused Servlet-specific code.
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta [ 10231 ]
          Fix Version/s 2.0.0 [ 10230 ]
          Assignee Priority P2
          Assignee Mircea Toma [ mircea.toma ] Ted Goddard [ ted.goddard ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21886 Fri Jul 09 14:55:36 MDT 2010 ted.goddard removed special case for Jetty continuations (ICE-5787)
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/core/src/main/java/org/icefaces/push/servlet/ICEfacesResourceHandler.java
          Hide
          Ted Goddard added a comment -

          DynamicResourceDispatcher.java depends on ICEfacesResourceHandler.java. It is straightforward to remove some of the thread-blocking related code from ICEfacesResourceHandler, however the resource dispatching infrastructure appears to require more significant changes.

          The current implementation made use of a WeakHashMap to hold weak references to the paths to the resources. Unfortunately, the lifetime of the path String in the heap is not strongly associated with the lifetime of the resource.

          It will be necessary to define a new resource API that allows the developer to indicate the scope of the resource (typically Application or Session) or to store that resource under an EL accessible name in their desired scope.

          public URI addResource(String name, Resource resource) //developer manages the scope
          public URI addApplicationResource(Resource resource)
          public URI addSessionResource(Resource resource)

          The two convenience methods are optional, but if desired, would return a unique, automatically assigned name for resolving the resource.

          Resource resolution would not require any persistent objects other than the resources themselves – the URI is sufficient to resolve the resource when requested.

          Careful attention must be paid to security to ensure that an attacker is not able to request arbitrary session or application objects over the network. It may be sufficient that the resource object must be of a Resource type.

          Show
          Ted Goddard added a comment - DynamicResourceDispatcher.java depends on ICEfacesResourceHandler.java. It is straightforward to remove some of the thread-blocking related code from ICEfacesResourceHandler, however the resource dispatching infrastructure appears to require more significant changes. The current implementation made use of a WeakHashMap to hold weak references to the paths to the resources. Unfortunately, the lifetime of the path String in the heap is not strongly associated with the lifetime of the resource. It will be necessary to define a new resource API that allows the developer to indicate the scope of the resource (typically Application or Session) or to store that resource under an EL accessible name in their desired scope. public URI addResource(String name, Resource resource) //developer manages the scope public URI addApplicationResource(Resource resource) public URI addSessionResource(Resource resource) The two convenience methods are optional, but if desired, would return a unique, automatically assigned name for resolving the resource. Resource resolution would not require any persistent objects other than the resources themselves – the URI is sufficient to resolve the resource when requested. Careful attention must be paid to security to ensure that an attacker is not able to request arbitrary session or application objects over the network. It may be sufficient that the resource object must be of a Resource type.
          Ken Fyten made changes -
          Salesforce Case []
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration]
          Assignee Priority P2 P1
          Ken Fyten made changes -
          Link This issue blocks ICE-5779 [ ICE-5779 ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Priority P1 P2
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.0-Beta2 [ 10242 ]
          Fix Version/s 2.0-Beta1 [ 10231 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21986 Tue Jul 20 15:12:40 MDT 2010 ted.goddard more extensive use of JSF APIs to eliminate abstraction layer (ICE-5787)
          Files Changed
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/Response.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/ServerProxy.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/webapp/CompatResourceServlet.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/application/ResourceRegistry.java
          Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/BasicAdaptingServlet.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/ProxyHttpSession.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/ICEfacesResourceHandler.java
          Commit graph DEL /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/webapp/ServeCSSResource.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/SessionDispatcher.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/DisposeWindowScope.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/Request.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/ServletEnvironmentListener.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/event/BridgeSetup.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/SessionExpiredException.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/PseudoServlet.java
          Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/util
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/AbstractServer.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/ResponseHandler.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/standard
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/event/WindowScopeSetup.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/PathDispatcher.java
          Commit graph DEL /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/webapp/ResourceServer.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/RequestProxy.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/ResponseProxy.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/MimeTypeMatcher.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvConfig.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/core.tld
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/DynamicResourceDispatcher.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/application/WindowScopeManager.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/faces-config.xml
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/ServletRequestResponse.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/SessionBoundServer.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/servlet/ServletContextConfiguration.java
          Commit graph DEL /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/webapp/FileServer.java
          Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/http/Server.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21987 Tue Jul 20 15:18:34 MDT 2010 ted.goddard more extensive use of JSF APIs to eliminate abstraction layer (ICE-5787)
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/util/Util.java
          Hide
          Ted Goddard added a comment -

          Some of the notable changes:

          • make WindowScope manager both a PhaseListener and a ResourceHandler to give it direct access to dispose-window and the PhaseListener setup operations
          • added compressResources to EnvUtils as a configuration parameter

          Changes verified with auction, compat/component-showcase, and scopes.

          Show
          Ted Goddard added a comment - Some of the notable changes: make WindowScope manager both a PhaseListener and a ResourceHandler to give it direct access to dispose-window and the PhaseListener setup operations added compressResources to EnvUtils as a configuration parameter Changes verified with auction, compat/component-showcase, and scopes.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21992 Wed Jul 21 08:30:29 MDT 2010 ted.goddard Util.HTTP_DATE format (ICE-5787)
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/webapp/CompatResourceServlet.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/util/Util.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/push/DynamicResourceDispatcher.java
          Deryk Sinotte made changes -
          Link This issue blocks ICE-4796 [ ICE-4796 ]
          Hide
          Ted Goddard added a comment -

          Overall changes complete.

          Show
          Ted Goddard added a comment - Overall changes complete.
          Ted Goddard made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P2

            People

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

              Dates

              • Created:
                Updated:
                Resolved: