The 3.1.3 snapshot includes a new implementation of Comet for Resin  
servlets.

There's a sketch of an example at

   http://caucho.com/resin-3.1/examples/servlet-comet/index.xtp

Javadocs are at

    http://caucho.com/resin-javadoc/com/caucho/servlets/comet/package- 
summary.html

The basic model is similar to the normal servlet, except there's a  
new service() and a resume() call in the AbstractCometServlet.

The CometController is the main object that's passed from the servlet  
to your application comet code.  Its main methods are wake(), close 
(), and setAttribute()/getAttribute().

The CometController is thread-safe.  As always, the ServletRequest  
and ServletResponse and the PrintWriter/ServletOutputStream are *not*  
thread-safe.  You must not store the request/response or output in  
object or pass them to other threads.  The only way other threads in  
your application can talk to the Comet request is through the  
CometController.  Data is passed through get/setAttribute (which sets  
request.setAttribute in a thread-safe manner) and the servlet is  
resumed with wake().

We'll cleanup the example in a bit to make a bit more sense.

The 3.1.3 release has been delayed another week (due primarily to  
Quercus issues), so we're now aiming for the week of October 5.

-- Scott


  


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to