Most browsers only support 2 outstanding AJAX events - that may be what you
are running into.  Without knowing what other calls you make, I cannot make
a recommendation.

One thing that does come to mind is that I hope you only call getEvents once
on startup.

On Wed, Apr 22, 2009 at 4:47 PM, [email protected]
<[email protected]>wrote:

>
> Hi.
> I'm trying to implement chat on my GWT app. So client has getEvents()
> function implemented like this :
>
>   public void getEvents( )
>    {
>        networkSvc.getEvents(
>                       new AsyncCallback< ArrayList<Event> >()
>                        {
>                                public void onSuccess( ArrayList< Event >
> events )
>                                {
>                                        handleEvents( events );
>                                        networkSvc.getEvents( this );
>                                }
>                                public void onFailure( Throwable caught )
>                                {
>                                        System.out.println("eventListner " +
> caught );
>                                }
>                        }
>        );
>    }
>
> This func in an endless loop with the server .
> at the server side getEvents goes to sleep for 30 sec or till events
> approaching.
> The second function is sendEvent() function.
> As i see, i can't send an event to server while the server processing
> the previos request.
> I mean it looks like the sendEvent() waits till the getEvents() gets
> the response,
> and just after that it sends its own request.
> Is that right, or there is some bug in my algorithm ?
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to