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 Tue, Sep 30, 2014 at 11:29 PM, Lance Java <lance.j...@googlemail.com>
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.
>
> Please note that if you use any PerThread services on the thread (eg
> Hibernate Session) you'll need to call PerthreadManager.cleanupThread()
> once your worker finishes. If you instead use the ParallelExecutor service,
> this will be done for you.
>

Reply via email to