1 Reply Latest reply on Jul 17, 2009 10:56 AM by Peter Johnson

    Out of memory exception in implementing  HttpEventServlet

    Ravikumar Sundaram Newbie

      Hi,
      I have written a servlet which implements HttpEventServlet in Jboss 5.0, here is my event method.

      public void event(HttpEvent event) throws IOException, ServletException {
      HttpServletRequest request = event.getHttpServletRequest();
      HttpServletResponse response = event.getHttpServletResponse();
      System.out.println("Event Triggered .. " + event.getType());
      switch (event.getType()) {
      case BEGIN: {
      try {
      PrintWriter pr = response .getWriter();
      pr.write("Okie");
      pr.flush();
      pr.close()
      event.close();
      } catch(Exception e){
      e.printStackTrace();
      } finally {
      }
      break;
      }
      case EVENT:
      event.close();
      break;
      case ERROR:
      case EOF:
      case END:
      case TIMEOUT: {
      event.close();
      break;
      }

      }
      }


      When run a performance test for this servlet i am getting OutofmemoryError. can any one tried implementing HttpEventServlet in Jboss 5.0 ?