if you just want polling (every X seconds), then that is already possible
just fine with the
AbstractAjaxTimerBehavior (or its subclass)

I do that currently in my project.
I poll with my own ajax timer behavior attached to the page and when that
request comes in
i ask the component tree which component wants to rerender itself because it
is changed compared to the previous render.
Then i render those components (or render nothing except setting the timer
again for the next time) and end the request.

Syncing on something or things like that shouldnt be done currently.
I guess we need something else. Now it is internal to wicket that request
are blocked by there pagemap.
So if 2 request for the same pagemap comes in. The second request waits for
the first to end.
Now if you going to wait inside such a block all other request will never
pass.
But what we could make i guess is a public api:

Session.releasePageMap(pagemap)
Session.blockPageMap(pagemap)

by default this is just called by use. But as a developer you can release it
if you want and if you know what you are doing.

johan




On 3/1/07, Dan Brough <[EMAIL PROTECTED]> wrote:

I'm sorry I don't understand too well how jetty works as I have only
been using it for a week or
so and so far I'm pleased as punch with what Ive achieved in that time.

It would be nice to have some sort of AjaxPollBehaviour though.

I personally don't care much about jetty continuation's as I'm happy to
have a thread for each poll.
(No scalability concerns at the moment)

Does anyone have a quick cheap-n-nasty trick for updating jetty
components via a server triggered event ?

I haven't delved into the source code much but I tried doing a wait on a
session object in the  AjaxSelfUpdatingTimerBehavior
and that blocked all other client side Ajax requests as well.
(I'm using jetty 6.1 and jetty trunk source)

Perhaps the javascript loop was blocked while the
AjaxSelfUpdatingTimerBehavior was doing its thing ?
I'm not sure if thats possible but my javascript/ajax knowledge is very
minimal and will hopefully stay
that way thanks to Wicket.

Dan Brough.


Johan Compagner wrote:
> I haven't looked in dept into the jetty feature but as far as i know
> jetty hold the connection open. It pools it internally and when a
> request (from the client)
> comes in that connection is used and the request is pretty much
> handled like
> a normal servlet request.
>
> The problem is how and where does your code run when you get a server
> side event
> that then takes the connection from the pool again and sends something
> to the client
> (without the client requesting really for something)
>
> Can you ask jetty "he i want to talk to that client, give me the
> socket connection"
> so where do you "wait" would that be in wicket code or can that be in
> jetty?
> Because if that was in wicket code then we have to build in some support
> because else the page(map) is locked for anything else constantly.
>
> Johan


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to