trying comet on glassfish v2 beta2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

trying comet on glassfish v2 beta2

Enrique Rodríguez Lasterra-2
Hi all, i'm looking comet but i am getting some problems.

I'm writing an example that use prototype (Ajax.request) to call a comet servlet. When i make the first call to attach the user/request to comet the servlet block the response. Is this the normal behaviour?

Another question is how can i get the sources of grizzly-comet (glassfish v2 b2 ) to see what is behind the scenes.

Regards, Enrique.

--
_______________________________
Enrique Rodriguez Lasterra
lasterra AT javahispano DOT org
http://www.javahispano.org
Asociación sin ánimo de lucro sobre java
Spanish non profit association about java
Reply | Threaded
Open this post in threaded view
|

Re: trying comet on glassfish v2 beta2

Enrique Rodríguez Lasterra-2
I try to reply myself to the first one;

I'm writing an example that use prototype (Ajax.request) to call a comet servlet. When i make the first call to attach the user/request to comet the servlet block the response. Is this the normal behaviour?

YES, comet block the response becouse it will use the connection to notify events of the context.
--
_______________________________
Enrique Rodriguez Lasterra
lasterra AT javahispano DOT org
http://www.javahispano.org
Asociación sin ánimo de lucro sobre java
Spanish non profit association about java
Reply | Threaded
Open this post in threaded view
|

Re: trying comet on glassfish v2 beta2

Jeanfrancois Arcand-2
Hi Enrique,

beta2 was broken (unless you remove the <property
name="proxiedProtocols" ../> line. B51 will contains the fix thanks to
your post on my blog :-) You can download an Ajax.request example here
[1]. This is an example that will be part of my next blog on "New
Adventure in Comet" series :-). The example has been written by Takai
Naoto and it is a great example to start with.

As for the src, you can find GlassFish v2 Comet implementation in [2].
The latest version is 1.0.15.

Thanks

-- Jeanfrancois

[1] http://weblogs.java.net/blog/jfarcand/archive/demo.war
[2]
https://maven-repository.dev.java.net/nonav/repository/grizzly/jars/grizzly-1.0.15-sources.jar

Enrique Rodríguez Lasterra wrote:

> I try to reply myself to the first one;
>
>
>     I'm writing an example that use prototype (Ajax.request) to call a
>     comet servlet. When i make the first call to attach the user/request
>     to comet the servlet block the response. Is this the normal behaviour?
>
>
> YES, comet block the response becouse it will use the connection to
> notify events of the context.
> --
> _______________________________
> Enrique Rodriguez Lasterra
> lasterra AT javahispano DOT org
> http://www.javahispano.org
> Asociación sin ánimo de lucro sobre java
> Spanish non profit association about java

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: trying comet on glassfish v2 beta2

Jeanfrancois Arcand-2
Hi Enrique,

just read your last blog. I think I understood event if it is in Spanish
:-) And my example in the first reply will not help based on the
Javascript described in your blog :-)

Jeanfrancois Arcand wrote:

> Hi Enrique,
>
> beta2 was broken (unless you remove the <property
> name="proxiedProtocols" ../> line. B51 will contains the fix thanks to
> your post on my blog :-) You can download an Ajax.request example here
> [1]. This is an example that will be part of my next blog on "New
> Adventure in Comet" series :-). The example has been written by Takai
> Naoto and it is a great example to start with.
>
> As for the src, you can find GlassFish v2 Comet implementation in [2].
> The latest version is 1.0.15.
>
> Thanks
>
> -- Jeanfrancois
>
> [1] http://weblogs.java.net/blog/jfarcand/archive/demo.war
> [2]
> https://maven-repository.dev.java.net/nonav/repository/grizzly/jars/grizzly-1.0.15-sources.jar 
>
>
> Enrique Rodríguez Lasterra wrote:
>> I try to reply myself to the first one;
>>
>>
>>     I'm writing an example that use prototype (Ajax.request) to call a
>>     comet servlet. When i make the first call to attach the user/request
>>     to comet the servlet block the response. Is this the normal
>> behaviour?
>>
>> YES, comet block the response becouse it will use the connection to
>> notify events of the context.

You need to set CometContext.setBlockingNotification(false) if you don't
want the connection to be blocking.

Hope that help. Continue the great work!

-- Jeanfrancois



>> --
>> _______________________________
>> Enrique Rodriguez Lasterra
>> lasterra AT javahispano DOT org
>> http://www.javahispano.org
>> Asociación sin ánimo de lucro sobre java
>> Spanish non profit association about java
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]