You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vit Rozkovec <wi...@rozkovec.info> on 2007/11/30 11:40:00 UTC

Binding application to another thred

Good day,
when I create new thread, what is the proper way of binding application 
to this new thread?

Vitek


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


Re: Binding application to another thred

Posted by Vit Rozkovec <wi...@rozkovec.info>.
Thank you,
I will have a look at it.
Vitek

Eelco Hillenius wrote:
>> Thanks.
>> I just thought that there would be some "correct" way how to do it
>> because as I read Application.set() is not part of public api.
>>     
>
> The correct way is not to do it *typically*. If you have a good
> reason, you can always ignore such comments :-)
>
>   
>> My scenario is this:
>> I have a wizard.
>> After proceeding to second step I need to transfer large amount of data
>> and store information to database.
>> This operation may take sometimes over five minutes and I want to let
>> user know what is going on.
>>
>> So far, upon step initialization, I did it by attaching
>> AjaxSelfUpdatingTimerBehavior to a component which shows current status.
>> In the step initialization routine I also spin of new thread which makes
>> the transfer and update one shared field, which component with
>> AjaxSelfUpdatingTimerBehavior uses.
>>
>> If any of you would know of better way how to solve this problem, I
>> would be grateful to hear.
>>     
>
> Take a look at the UploadProgressBar in package
> org.apache.wicket.extensions.ajax.markup.html.form.upload. I think
> Andrew and Igor did a great job at that.
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


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


Re: Binding application to another thred

Posted by Eelco Hillenius <ee...@gmail.com>.
> Thanks.
> I just thought that there would be some "correct" way how to do it
> because as I read Application.set() is not part of public api.

The correct way is not to do it *typically*. If you have a good
reason, you can always ignore such comments :-)

> My scenario is this:
> I have a wizard.
> After proceeding to second step I need to transfer large amount of data
> and store information to database.
> This operation may take sometimes over five minutes and I want to let
> user know what is going on.
>
> So far, upon step initialization, I did it by attaching
> AjaxSelfUpdatingTimerBehavior to a component which shows current status.
> In the step initialization routine I also spin of new thread which makes
> the transfer and update one shared field, which component with
> AjaxSelfUpdatingTimerBehavior uses.
>
> If any of you would know of better way how to solve this problem, I
> would be grateful to hear.

Take a look at the UploadProgressBar in package
org.apache.wicket.extensions.ajax.markup.html.form.upload. I think
Andrew and Igor did a great job at that.

Eelco

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


Re: Binding application to another thred

Posted by Vit Rozkovec <wi...@rozkovec.info>.
Thanks.
I just thought that there would be some "correct" way how to do it 
because as I read Application.set() is not part of public api.

My scenario is this:
I have a wizard.
After proceeding to second step I need to transfer large amount of data 
and store information to database.
This operation may take sometimes over five minutes and I want to let 
user know what is going on.

So far, upon step initialization, I did it by attaching 
AjaxSelfUpdatingTimerBehavior to a component which shows current status. 
In the step initialization routine I also spin of new thread which makes 
the transfer and update one shared field, which component with 
AjaxSelfUpdatingTimerBehavior uses.

If any of you would know of better way how to solve this problem, I 
would be grateful to hear.

Kind regards
Vitek

Eelco Hillenius wrote:
> On Nov 30, 2007 2:40 AM, Vit Rozkovec <wi...@rozkovec.info> wrote:
>   
>> Good day,
>> when I create new thread, what is the proper way of binding application
>> to this new thread?
>>     
>
> If you are sure you want to do this, you can use Application.set(app)
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


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


Re: Binding application to another thred

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 30, 2007 2:40 AM, Vit Rozkovec <wi...@rozkovec.info> wrote:
> Good day,
> when I create new thread, what is the proper way of binding application
> to this new thread?

If you are sure you want to do this, you can use Application.set(app)

Eelco

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


Re: Binding application to another thred

Posted by Martijn Dashorst <ma...@gmail.com>.
You know that creating threads in a servlet container yourself is A Bad
Thing (tm)?
You could try to use Application.get(String key) instead of Application.get
().

Martijn

On Nov 30, 2007 11:40 AM, Vit Rozkovec <wi...@rozkovec.info> wrote:

> Good day,
> when I create new thread, what is the proper way of binding application
> to this new thread?
>
> Vitek
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/