users@grizzly.java.net

Weird compilation error for cometContext.notify( null, CometEvent.NOTIFY, cometHandler);

From: Rodrigo Ramirez <rramirez_at_4home.com>
Date: Mon, 20 Apr 2009 12:19:59 -0700 (PDT)

Hi,

I noticed checking the comet api,
https://grizzly.dev.java.net/apidocs/com/sun/grizzly/comet/CometContext.html#removeCometHandler(com.sun.grizzly.comet.CometHandler,%20boolean)
, that the notify(Object attachment, int eventType, int cometHandlerID)
call I am using is O(n) and has been deprecated. To avoid the performance
penalty, I changed my code to use notify(Object attachment, int eventType,
CometHandler handler).


The weird thing is that after changing this


        cometContext.notify( null, CometEvent.NOTIFY, cometHandlerId);

by this

        CometHandler cometHandler
        
        ...
        
        cometContext.notify( null, CometEvent.NOTIFY, cometHandler);


I get the following compilation error as if the deprecated method was the
one I am trying to use:


C:\projects\portal\4HomeMedia-ejb\src\java\com\fourhomemedia\portal\messagequeue\PortalCometQueue.java:164:
cannot find symbol
symbol : method
notify(<nulltype>,int,com.sun.enterprise.web.connector.grizzly.comet.CometHandler)
location: class com.sun.enterprise.web.connector.grizzly.comet.CometContext
            cometContext.notify( null, CometEvent.NOTIFY, cometHandler);
1 error


I am including the appserv-rt.jar file shipped with Glassfish V2.1 in my
classpath so I can compile comet code. Any suggestion? What may I be doing
wrong?

Thanks,

Rodrigo
-- 
View this message in context: http://www.nabble.com/Weird-compilation-error-for-cometContext.notify%28-null%2C-CometEvent.NOTIFY%2C-cometHandler%29--tp23143148p23143148.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.