dev@grizzly.java.net

Re: comet and glassfish v2

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 01 Jul 2008 10:22:06 -0400

Salut,

Cam Bazz wrote:
> hello,
>
> I want to cometize a glassfish web app that I have been working on. is
> it possible to use comet feasibly without using glassfish?
>
> or is it even possible to use comet without glassfish.

Yes, it is. As an example, just download [1] and do:

java -jar grizzly-comet-webserver-1.8.0.jar -p 8080 -a yourApp.war
name_of_your_servlet_main class


>
> currently I am using grizzly in a standalone mode accessing a lucene
> index, as demonstrated in jean arcand's blog, and I have a servlet that
> takes request from web browser and forwards it to grizzly ARP server.
>
> the ultimate solution would be: servlet sending request to grizzly arp
> server, and then grizzly replying with comet, but I am new in comet and
> glassfish, so i dont know if it is technically possible.
>
> so far, all my attemts to run the hidden-example in glassfish v2 has
> failed. I am getting `java.lang.IllegalStateException: Grizzly Comet
> hasn't been registered' exception.

Have you enabled Comet in v2? You need to add, in domain.xml, the
following property under http-service:

<property name="cometSupport" value="true"/>

A+

-- Jeanfrancois

[1]
http://download.java.net/maven/2/com/sun/grizzly/grizzly-comet-webserver/1.8.0/grizzly-comet-webserver-1.8.0.jar


>
> Best Regards,
> -C.B.