Salut,
Rodrigo Ramirez wrote:
> 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).
>
Since you are using 2.1, the API is not the same. So I would not change
it and leave if for now.
Thanks!
-- Jeanfrancois
>
> 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