requests from a single session are serialized. but what if your page is
stateless and you click the two links fast?

each click spins off a request that now needs a session and because they run
concurrently two sessions are created because this is the first request that
needs a session.

try doing this in your page's constructor: Session.get().bind(); this will
force wicket to create a http session when the page renders and will avoid
this kind of problem.

-igor

On Thu, Oct 16, 2008 at 9:02 AM, Kaspar Fischer <[EMAIL PROTECTED]>wrote:

> I run into a concurrency issue: My pages load fine when I visit
> them slowly, one after the other with a pause between clicks.
> However, if I click on two links on my page very, very fast, an
> exception gets thrown.
>
> My session factory outputs the number of the thread and the hash
> code of the session created (in chronological order):
>
>  [89213] New [EMAIL PROTECTED]
>  [11349856] New [EMAIL PROTECTED]
>
> And after that, thread 89213 throws an exception:
>
>  Access in thread 89213 to data in session @43f1c from a different thread
> (11349856)!
>
> It seems that thread 89213 is accessing a session that was created
> *later*. How can something like this happen in Wicket when it
> handles requests (from a single session) sequentially? Any ideas?
>
> Thanks for any pointer,
> Kaspar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to