Java Mailing List Archive

http://www.junlu.com/

Home » Tomcat Users »

AW: Comet Request identification

Steffen Heil

2010-03-16

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi

I am using a ConcurrentHashMap on event.getHttpServletRequest() and this
works quite well.
- I am not sure, if this is by occasion or by design though.

Regards,
Steffen


-----Ursprüngliche Nachricht-----
Von: Animesh Sonkar [mailto:aksonkar@(protected)]
Gesendet: Montag, 15. März 2010 15:30
An: users@(protected)
Betreff: Comet Request identification

Hi,

I create a comet connection using sockets and sending a post request.
To prevent the server from terminating the request (calling END event) i am
sending some heartbeat messages as chunked data on the same socket/request
connection.

Is there a way in comet to identify, that the heartbeat message came from an
existing connection/request.

So here is a case:
1. I send a post request over a socket with transfer-encoding chunked and
Connection:keep alive headers.
2. The CometProcessor receives a BEGIN and a READ event. I save the request
and response objects.
3. After some time i send a chunked data over the same socket to keep
request alive
4. The CometProcessor receives a READ event.
Now in step 4 : is it possible to recognize that the chunked data came for
the same connection.

My main problem is to identify that on a END event, which connnection got
terminated.

Thanks,
Animesh
Sorry about blabberring my thoughts..

Attachment: smime.p7s (zipped)
©2008 junlu.com - Jax Systems, LLC, U.S.A.