geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r578378 - in /geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request: Request.java RequestTimeoutException.java
Date Sat, 22 Sep 2007 06:20:04 GMT
Author: jdillon
Date: Fri Sep 21 23:20:04 2007
New Revision: 578378

URL: http://svn.apache.org/viewvc?rev=578378&view=rev
Log:
Preserve the client side stack when request times out

Modified:
    geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/Request.java
    geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/RequestTimeoutException.java

Modified: geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/Request.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/Request.java?rev=578378&r1=578377&r2=578378&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/Request.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/Request.java
Fri Sep 21 23:20:04 2007
@@ -154,7 +154,8 @@
             return null;
         }
         else if (obj instanceof RequestTimeoutException) {
-            throw (RequestTimeoutException) obj;
+            // Throw a timeout exception preserving the client call stack
+            throw new RequestTimeoutException((RequestTimeoutException) obj);
         }
 
         // This should never happen

Modified: geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/RequestTimeoutException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/RequestTimeoutException.java?rev=578378&r1=578377&r2=578378&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/RequestTimeoutException.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/request/RequestTimeoutException.java
Fri Sep 21 23:20:04 2007
@@ -32,9 +32,15 @@
     private final Object id;
 
     public RequestTimeoutException(final Request request) {
-        super("Request timed out for ID: " + request.getId());
+        super("Request timed out: " + request.getId());
 
         this.id = request.getId();
+    }
+
+    public RequestTimeoutException(final RequestTimeoutException cause) {
+        super("Request timed out: " + cause.getId());
+
+        this.id = cause.getId();
     }
 
     public Object getId() {



Mime
View raw message