There are two methods:

  - Polling: calling the server in regular intervals
  - Pushing: the server sends data on its own to the client

For pushing i suggest you to take a look at Atmosphere

  - http://async-io.org/
- https://github.com/Atmosphere/atmosphere-extensions/wiki/Atmosphere-GWT-2.0

Regards,
Stefan

On 17.04.2013 14:21, Bhumika Thaker wrote:
Hi Stefan,

No, I don't want to make rpc call frequently. because it will create unnecessaryRPC call. As I mention I want to show*server time *to client frequently. so to avoid unnecessary RPC call like client->request->server than server->response->client
I am doing if time change than server->response->client only.

>>Seems someone still holds a reference to the objects, so it cant be garbage collected. As you see code then in UtilityCallerActionHandler, in this code NTTimerEvent event object created inside *Timer*.
private class ServerTimerTask extends TimerTask
    {
        public void run() {
            final Date theEventMessage = new Date();
            //create the event
            Event theEvent = new NTTimerEvent(theEventMessage);
            //add the event, so clients can receive it
            addEvent(NTTimerEvent.SERVER_MESSAGE_DOMAIN, theEvent);
        }
    }
As I know timer is thread and thread is not make eligible object for garbage collection which objects are created inside it. util stopped JVM. So that is why thread hold this reference. but I don't have any event other than thread to send this event to client.

Let me know is other approach to achieve this things.

Thanks,
Bhumika Thaker


On Wed, Apr 17, 2013 at 4:31 PM, Stefan Ollinger <stefan.ollin...@gmx.de <mailto:stefan.ollin...@gmx.de>> wrote:

    Seems someone still holds a reference to the objects, so it cant
    be garbage collected.
    You could create the objects on demand per RPC request.



--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to