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
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
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
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