You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2008/05/12 11:53:32 UTC
svn commit: r655454 -
/wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java
Author: jcompagner
Date: Mon May 12 02:53:31 2008
New Revision: 655454
URL: http://svn.apache.org/viewvc?rev=655454&view=rev
Log:
WICKET-433 improved reporting on locked page maps
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java?rev=655454&r1=655453&r2=655454&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Session.java Mon May 12 02:53:31 2008
@@ -37,6 +37,7 @@
import org.apache.wicket.request.ClientInfo;
import org.apache.wicket.session.ISessionStore;
import org.apache.wicket.util.lang.Objects;
+import org.apache.wicket.util.string.AppendingStringBuffer;
import org.apache.wicket.util.string.Strings;
import org.apache.wicket.util.time.Duration;
import org.slf4j.Logger;
@@ -740,12 +741,29 @@
if (t != null && t != Thread.currentThread() &&
(startTime + timeout.getMilliseconds()) < System.currentTimeMillis())
{
+ AppendingStringBuffer asb = new AppendingStringBuffer(100);
+ asb.append("After " + timeout + " the Pagemap " + pageMapName +
+ " is still locked by: " + t +
+ ", giving up trying to get the page for path: " + path);
// if it is still not the right thread..
// This either points to long running code (a report
// page?) or a deadlock or such
- throw new WicketRuntimeException("After " + timeout + " the Pagemap " +
- pageMapName + " is still locked by: " + t +
- ", giving up trying to get the page for path: " + path);
+ try
+ {
+ StackTraceElement[] stackTrace = t.getStackTrace();
+ asb.append("\n\tBegin of stack trace of " + t);
+ for (StackTraceElement stackTraceElement : stackTrace)
+ {
+ asb.append("\n\t");
+ asb.append(stackTraceElement);
+ }
+ asb.append("\n\tEnd of stack trace of " + t);
+ }
+ catch (Exception e)
+ {
+ // ignore
+ }
+ throw new WicketRuntimeException(asb.toString());
}
}