I've tried to reproduce it, but without luck so far. Looking at that code, I was wondering about a few things though... what is the idea on the whole thread thing (usedPages)? Why would t != Thread.currentThread() be recoverable? Why not use a thread local instead?
Why throw an exception on catching a InterruptedException? That interruption is of no consequence for what the code does; the time was chosen arbitrarily, and the interruption does not leave that the object in an invalid state. Calling wait frees the lock on Session for another thread to use, while and another thread calling notifyAll - which happens later that method and in pageDetached - would cause the InterruptedException to be thrown for the first thread, which is perfectly fine, right? Or am I missing something here? Why do you use Session.wait() rather than Thread.sleep() in the first place? Or a better question: what exactly do you want to synchronize? Shouldn't pageMapForName be synchronized (and let createAutoPageMapName use a different lock)? And if you're worried about usedPages, why not use a synchronized map? I probably missed a lot as I haven't been involved in developing that part, but I'd appreciate some explanation behind these ideas (feel free to comment the code instead of putting everything in an answer to this mail). Eelco Eelco On 9/7/06, Johan Compagner <[EMAIL PROTECTED]> wrote: > Can you reproduce this in a sample and make a bug report out of it? > > The used pages should be cleared in a finaly block in the page detach. > IF that doesn't happen somehow then that is a bug. > > johan > > > > > On 9/7/06, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote: > > There's a problem with my app, where clicking on a link would generate > > an ArrayOutOfBoundsException. However, pressing the back button and > > clicking on any other link in the page would cause an infinite loop in > > the getPage method of Session, between lines 405 and 415 (Wicket > > 1.2.2),where the current thread waits and checks untill its equal (?) to > > the retrieved thread from the usedPages Map. > > > > while (t != null && t != Thread.currentThread()) > > { > > try > > { > > wait(1000); > > } > > catch (InterruptedException ex) > > { > > throw new WicketRuntimeException(ex); > > } > > t = (Thread)usedPages.get(id); > > } > > > > Has anybody a clue what's making the Session behave like this ? > > > > Iman > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user