This is my experience as well. It appears that the handler is not being
registered properly for some reason. This is occurring in the example and
also in my own code which worked fine with GlassFish v2.
John
From: Jake Lockerbe [mailto:lockekal1965_at_aol.com]
Sent: Wednesday, 14 July 2010 03:36
To: users_at_grizzly.dev.java.net
Subject: Re: onEvent() not invoked by notify() , More Info
Since my last message, I have done the following:
Updated my onEvent() method to resume the CometHandler.
Updated my GlassFish version to 3.0.1 build 22.
Run asadmin with the args to setup comet support.
However, I still cannot get the sample code I posted to work.
I investigated this further by stepping through the code in NetBeans and I
discovered that after
the cc.addCometHandler(handler) method is invoked, if I look at the
CometContext object (cc)
properties, the handlers property (which is a ConcurrentHashMap) shows
size=0. Thus, it appears
that no handlers were ever registered.
It seems to me that if the handler is never registered on the CometContext
object there is
no way onEvent() can ever be invoked.
Any ideas ?
Thanks
Jake