You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kayode Odeyemi <dr...@gmail.com> on 2012/01/31 12:16:03 UTC

How to make a threaded request within Wicket Application init

If Wicket Application is a singleton, how do I make concurrent request
on initialization of my application without getting a
WicketRuntimeException?

For example I simply want to reload a Page in order to get a RefreshingView
component
to set its content whenever getObject is triggered.

So i will like to know, how do I make a threaded request within init?

Thanks

-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

Re: How to make a threaded request within Wicket Application init

Posted by Kayode Odeyemi <dr...@gmail.com>.
On Tue, Jan 31, 2012 at 11:23 AM, Martin Grigorov <mg...@apache.org>wrote:

> Application#init() is called during
> javax.servlet,Filter#init(FilterConfig), so there is no http request
> at that time.
>
> What exactly do you want to do with the Page ?
>

I understand that IModel getObject is called once. So in order to call it
multiple times, I wrote a scheduler using GAE TaskQueue to initialize the
Page at intervals. So whenever the Page is reloaded, the content within
RefreshingView is reloaded, getting new content as returned by getObject.
Something similar to streaming a content.


-- 
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

Re: How to make a threaded request within Wicket Application init

Posted by Martin Grigorov <mg...@apache.org>.
Application#init() is called during
javax.servlet,Filter#init(FilterConfig), so there is no http request
at that time.

What exactly do you want to do with the Page ?

P.S. Application is not a singleton, but a ThreadLocal. There is a
slight difference.

On Tue, Jan 31, 2012 at 1:16 PM, Kayode Odeyemi <dr...@gmail.com> wrote:
> If Wicket Application is a singleton, how do I make concurrent request
> on initialization of my application without getting a
> WicketRuntimeException?
>
> For example I simply want to reload a Page in order to get a RefreshingView
> component
> to set its content whenever getObject is triggered.
>
> So i will like to know, how do I make a threaded request within init?
>
> Thanks
>
> --
> Odeyemi 'Kayode O.
> http://www.sinati.com. t: @charyorde



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org