JBoss Community

Issue with Advanced IO

created by ronorato in JBoss AS 7 Development - View the full discussion

I have have some problems with getting HttpEventServlet to respond to the BEGIN event from my web client.  Using WireShark I am seeing the handshake request begin sent from the web client to the web server.  Using my tracing I am seeing the BEGIN event being called, but I am not seeing the web server respond back to the web client.  This is causing the web client to timeout and retry the handshake.

 

Here is the event method from my servlet that implements HttpEventServlet:

 

public void event(HttpEvent event)

    throws IOException, ServletException

  {

    log.info("event() entered");

   

    HttpServletRequest request = event.getHttpServletRequest();

    HttpServletResponse response = event.getHttpServletResponse();

       

    switch (event.getType()) {

      case BEGIN:

        log.info("Begin for session: " + request.getSession(true).getId());

        StringBuilder toLog = new StringBuilder();

 

         Enumeration params = request.getParameterNames();

        // Debug code

        while(params.hasMoreElements()) {

            String current = (String) params.nextElement();

            toLog.append(current + "=" + request.getParameter(current));

            if(params.hasMoreElements()) {

                toLog.append(", ");

            }

        }

        log.warn("BEGIN Parameters: " + toLog.toString());

 

        messageSender.addConnection(response);

        break;

      .......

 

the debug code produces the following output:

 

13:43:09,688 INFO  event() entered

13:43:09,688 INFO  Begin for session: PJG9NHvS1qi t-vJE7uDDJisF

13:43:09,688 WARN  BEGIN Parameters: message=[{"version":"1.0","minimumVersion":"0.9","channel":"/meta/handshake","id":"6","supportedConnectionTypes":["long-polling","long-polling-json-encoded","callback-polling"]}]

 

Any help would be greatly appreciated.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community