On 09-02-2010 11:18, albert kao wrote:
> I want to use Push simulated via long poll: write some JavaScript
> (AJAX style).
> How are this idea?
> On the server a file is created that holds a timestamp (for example).
> Pull that file from the web client every 10 secs or so. If it is
> changed,
> refresh the web page.
> Also, when a jms message is received or Apache DB database is changed,
> update that file on the server
> with the new timestamp in it.
That sounds awfully primitive.
The servlet code processing your AJAX request should
be able to return XML (or JSON) based on in memory
data structures.
Arne
|