Re: Page instance variables and threads

2014-10-01 Thread Thiago H de Paula Figueiredo
On Wed, 01 Oct 2014 03:29:24 -0300, Lance Java wrote: As you've discovered, tapestry stores page properties as PerThreadValues that are null on the non request thread. You should pass any contextual information to your worker's constructor. This happens since 5.2, when the page pool was abo

Re: Page instance variables and threads

2014-10-01 Thread Kalle Korhonen
I agree with Lance that passing the values as parameters in the thread's constructor is the right way but short of that, referencing (final) local variables in the inner classes seems like a fine solution to me. There's no generic way to share the state of one thread with other threads. Kalle On

Re: Page instance variables and threads

2014-09-30 Thread Lance Java
As you've discovered, tapestry stores page properties as PerThreadValues that are null on the non request thread. You should pass any contextual information to your worker's constructor. Please note that if you use any PerThread services on the thread (eg Hibernate Session) you'll need to call Per

Page instance variables and threads

2014-09-30 Thread Alex Kotchnev
I'm putting together a pretty simple application that needs to launch a bunch of background threads to do some work, and the page waits for all of them to complete, and then returns the aggregated results. Now, that sounds pretty straightforward (e.g. sample scala code). Now, the interesting part