<h1>GlassFish v3 User Task Analysis for Comet</h1>
Attendees: Rajeev, Jean-Francois Facilitator: Jennifer Recorder: Dixie

Back to GlassFish v3 User Task Analyses

Scope

To identify the tasks that a devloper and an administrator must perform to write a component that supports Comet.

Related Information

Developer Tasks

  1. Setting load-on-startup to 0 in the DD
  2. Creating the component that supports Comet requests (can be a servlet or JSP)
  3. Registering the component with the Comet Engine
    1. Defining the context path that will be considered for Comet processing
    2. Getting an instance of the Comet engine
    3. Registering the context path to the Comet engine, which will return a CometContext
      1. Specifying when polling happens
  4. Managing Server Push With Notification Handler
    1. Using the Default Handler
      1. Configuring the Number of Threads
    2. Creating Your Own Notification Handler
      1. Configuring the Thread Pool
      2. Filtering the Server Push
  5. Defining a Comet handler that sends a response back to the client when the appropriate action occurs on the server
    1. Creating a CometHandler implementation in the doGet Method
    2. Attaching an HttpServletResponse to represent the response to the client
    3. Getting the CometContext object for the given contextPath
    4. Using onEvent to define what happens when an event is received
  6. Adding a CometHandler to the CometContext object
    • for a servlet JSP
    • for a server-side resource, such as a DB
  7. Setting how long a request is polled.
  8. Notifying the CometHandler of an event using the Comet context
    1. Using doPost
      • Call comet.context.notify
    2. Using doGet
      1. Suspending the request
      2. Resuming the request
        • For long polling
        • For HTTP Streaming
    3. Specifying the type of CometEvent you want to push
      • doPost
      • doGet

Administrator Tasks

Associated Concepts

Back to GlassFish v3 User Task Analyses