You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by ch...@apache.org on 2007/04/17 09:00:50 UTC

svn commit: r529509 - in /webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse: Constants.java core/axis2/SynapseCallbackReceiver.java

Author: chathura_ce
Date: Tue Apr 17 00:00:49 2007
New Revision: 529509

URL: http://svn.apache.org/viewvc?view=rev&rev=529509
Log:
Added numerical error codes for timeout and sending error. Added the timeout handler interval to the Constants.

Modified:
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
    webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java?view=diff&rev=529509&r1=529508&r2=529509
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java Tue Apr 17 00:00:49 2007
@@ -174,6 +174,13 @@
     int ENDPOINT_STATISTICS = 2;
 
     /**
+     * Interval for activating the timeout handler for cleaning up expired requests. Note that
+     * there can be an error as large as the value of the interval. But for smaller intervals and
+     * larger timeouts this error is negligable.
+     */
+    long TIMEOUT_HANDLER_INTERVAL = 1000;
+
+    /**
      * don't do anything for response timeouts. this means infinite timeout. this is the default
      * action, if the timeout configuration is not explicitly set.
      */
@@ -189,8 +196,8 @@
     int DISCARD_AND_FAULT = 102;
 
     /**
-     * Error codes for message sending
+     * Error codes for message sending. We go with closest HTTP fault codes.
      */
-    String TIME_OUT = "500";
-    String SENDING_FAULT = "600";
+    String TIME_OUT = "504";
+    String SENDING_FAULT = "503";
 }

Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java?view=diff&rev=529509&r1=529508&r2=529509
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java Tue Apr 17 00:00:49 2007
@@ -51,7 +51,7 @@
         // create the Timer object and a TimeoutHandler task. Schedule it to run every 10 seconds from here
         TimeoutHandler timeoutHandler = new TimeoutHandler(callbackStore);
         timeOutTimer = new Timer(true);
-        timeOutTimer.schedule(timeoutHandler, 0, 1000);
+        timeOutTimer.schedule(timeoutHandler, 0, Constants.TIMEOUT_HANDLER_INTERVAL);
     }
 
     public void addCallback(String MsgID, Callback callback) {



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org