ICEfaces
  1. ICEfaces
  2. ICE-7864

IllegalStateException when using Server Push on iPlanet Web Server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P03
    • Fix Version/s: EE-1.8.2.GA_P04
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      iPlanet Web Server 7.0, AuctionMonitor

      Description

      When deploying AuctionMonitor to iPlanet Web Server 7.0, the following IllegalStateException is seen when accessing the application:

      Caused by: java.lang.IllegalStateException: WEB4221: Cannot use request/response objects across multiple request processing threads
      at com.sun.webserver.connector.nsapi.NSAPIConnector.jniSetResponseHeader(Native Method)
      at com.sun.webserver.connector.nsapi.NSAPIResponse.addHeader(NSAPIResponse.java:229)
      at org.apache.coyote.tomcat5.CoyoteResponseFacade.addHeader(CoyoteResponseFacade.java:492)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.setHeader(ServletRequestResponse.java:266)
      at com.icesoft.faces.webapp.http.common.standard.FixedXMLContentHandler.respond(FixedXMLContentHandler.java:45)
      at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:242)
      at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:83)
      at com.icesoft.faces.webapp.http.core.SendUpdatedViews.respondIfViewsAvailable(SendUpdatedViews.java:153)
      ... 24 more

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28205 Wed Mar 07 07:41:12 MST 2012 jack.van.ooststroom Fixed JIRA ICE-7864 : IllegalStateException when using Server Push on iPlanet Web Server
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/util/ServerUtility.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainServlet.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/ViewQueue.java
          Jack Van Ooststroom created issue -
          Jack Van Ooststroom made changes -
          Field Original Value New Value
          Assignee Jack van Ooststroom [ jack.van.ooststroom ]
          Jack Van Ooststroom made changes -
          Link This issue blocks ICE-7631 [ ICE-7631 ]
          Hide
          Jack Van Ooststroom added a comment -

          Sending src/com/icesoft/faces/webapp/http/core/ViewQueue.java
          Sending src/com/icesoft/faces/webapp/http/servlet/MainServlet.java
          Sending src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
          Sending src/com/icesoft/util/ServerUtility.java
          Transmitting file data ....
          Committed revision 28205.

          Show
          Jack Van Ooststroom added a comment - Sending src/com/icesoft/faces/webapp/http/core/ViewQueue.java Sending src/com/icesoft/faces/webapp/http/servlet/MainServlet.java Sending src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java Sending src/com/icesoft/util/ServerUtility.java Transmitting file data .... Committed revision 28205.
          Hide
          Jack Van Ooststroom added a comment -

          Upon receiving a ping request for a particular User-Agent, the server now has two outstanding requests for this User-Agent: a ping request and a receive-updated-views request. What happens when a ping request is received is that a Pong command is added to the ViewQueue, and by doing this the listener of the ViewQueue gets executed. This results in a response being prepped for the receive-updated-views request. This means that the server assigned thread for handling the ping request is involved in prepping the response for the receive-updated-views request, even though it doesn't actually send the request. iPlanet doesn't allow this kind of behavior. In order to resolve this the ViewQueue is now created with an Executor. Based on the application server being used, this Executor is either the Executor created in the MainServlet in case iPlanet is used, or null in any other case. Now when the ViewQueue gets a command added, it now checks to see if the listener can be executed directly, thus on the same thread, or if it needs to use the Executor in order to use a Core Thread to execute the listener instead of the server assigned thread. Marking this one as FIXED.

          Show
          Jack Van Ooststroom added a comment - Upon receiving a ping request for a particular User-Agent, the server now has two outstanding requests for this User-Agent: a ping request and a receive-updated-views request. What happens when a ping request is received is that a Pong command is added to the ViewQueue, and by doing this the listener of the ViewQueue gets executed. This results in a response being prepped for the receive-updated-views request. This means that the server assigned thread for handling the ping request is involved in prepping the response for the receive-updated-views request, even though it doesn't actually send the request. iPlanet doesn't allow this kind of behavior. In order to resolve this the ViewQueue is now created with an Executor. Based on the application server being used, this Executor is either the Executor created in the MainServlet in case iPlanet is used, or null in any other case. Now when the ViewQueue gets a command added, it now checks to see if the listener can be executed directly, thus on the same thread, or if it needs to use the Executor in order to use a Core Thread to execute the listener instead of the server assigned thread. Marking this one as FIXED.
          Jack Van Ooststroom made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Jack Van Ooststroom
              Reporter:
              Jack Van Ooststroom
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: