Existing comet connections

1 view
Skip to first unread message

Inna

unread,
Oct 13, 2008, 10:22:44 AM10/13/08
to rocket-gwt
Hi,
I need to be able to check on the server if comet connection exists
for the given HttpSession. Is there a way to get this information from
rocket implementation or do I somehow need to keep track of existing
comet connections myself? If I have to do it myself, what is the best
approach?
Thanks for your help,
Inna

Miroslav Pokorny

unread,
Oct 13, 2008, 10:55:12 PM10/13/08
to rocke...@googlegroups.com
Hi Inna

You will need to keep track of these things yourself. One could just have a singleton or static variable on the client and check before creating a new session.
--
mP

Inna

unread,
Oct 14, 2008, 6:59:47 AM10/14/08
to rocket-gwt
mP, thanks for your quick reply.
I need to keep track of the connections on the server. The reason for
that is that i have another windows application that is listening to
server events and if something interesting happens is required to open
browser and login to web application, but only if user is not already
logged in on the same computer. I thought that the most reliable way
is to check if rocket connection is opened for that computer. I am
thinking of keeping a static map on the server that links computer
name (or ipaddress) to the last payload time stamp. The time stamp
will be updated everytime poll() method is called and can be used to
make a decision on whether there is active connection between the
given computer browser and server.
Does this seem sensible to you?
Inna

On 14 Oct, 03:55, "Miroslav Pokorny" <miroslav.poko...@gmail.com>
wrote:
> Hi Inna
>
> You will need to keep track of these things yourself. One could just have a
> singleton or static variable on the client and check before creating a new
> session.
>

Miroslav Pokorny

unread,
Oct 14, 2008, 7:12:15 AM10/14/08
to rocke...@googlegroups.com
Sounds reasonable given your requirements...

Sent from my iPhone

Inna

unread,
Oct 14, 2008, 8:58:06 AM10/14/08
to rocket-gwt
thank you

On 14 Oct, 12:12, Miroslav Pokorny <miroslav.poko...@gmail.com> wrote:
> Sounds reasonable given your requirements...
>
> Sent from my iPhone
>
> >> mP- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages