Hi,

depends on what you want to achieve:

First possibility is to only show new messages when a user clicks on a
link or refreshes the page. This is easy and efficient, but not so
convenient for the user.

Second possibility is to do some polling (e.g. every 10 seconds). If
you have a relatively steady stream of messages coming in, this is not
a bad (maybe even the best!) approach - just adjust the polling
frequency.

If however, the interval between the messages varies by a big factor,
then the second method can be very wasteful. In that case, you can do
Comet. This is a relatively advanced technique that bends the rules of
stateless http a little bit. You will need more server resources with
this approach, but a lot of this can be alleviated with asynchronous
processing (provided by Servlet 3.0, as well as some special
implementations in Tomcat, Jetty etc.) If you want to dive into these
techniques, search for tutorials on Comet, Asynchronous Processing,
Servlet 3.0, Continuations. You should know a little bit what you're
doing, before deciding to use Comet - but it can be very cool :-)

hth
Chris


On Feb 25, 12:15 am, vkrejcirik <[email protected]> wrote:
> Hi,
> I have application, which on server collects messages from JMS topic.
> I need to send this data from server to client. Is it possible?
> Or I must make RPC call on client, which periodicly send request to
> server for these messages and it send me the messages in response.
>
> thank you for your answers

-- 
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