ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r586418 - /ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
Date Fri, 19 Oct 2007 13:08:51 GMT
Author: boisvert
Date: Fri Oct 19 06:08:50 2007
New Revision: 586418

URL: http://svn.apache.org/viewvc?rev=586418&view=rev
Log:
Fix ODE-198: OdeConsumerAsync times-out right away instead of waiting for responseTimeout

Modified:
    ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java

Modified: ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java?rev=586418&r1=586417&r2=586418&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
(original)
+++ ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
Fri Oct 19 06:08:50 2007
@@ -102,7 +102,7 @@
             Object[] inouts = _mexTimeouts.keySet().toArray();
             for (int i=0; i<inouts.length; i++) {
                 long timeout = _mexTimeouts.get(inouts[i]);
-                if (timeout >= now) {
+                if (now >= timeout) {
                     _mexTimeouts.remove(inouts[i]);
                     final PartnerRoleMessageExchange pmex = _outstandingExchanges.remove(inouts[i]);
 
@@ -110,17 +110,17 @@
                         continue;
 
                     __log.warn("Timeout on JBI message exchange " + inouts[i]);
-        try {
-            _ode._scheduler.execIsolatedTransaction(new Callable<Void>() {
-                public Void call() throws Exception {
-                    pmex.replyWithFailure(FailureType.NO_RESPONSE, "Response not received
after " + _responseTimeout + "ms.", null);
-                    return null;
+                    try {
+                        _ode._scheduler.execIsolatedTransaction(new Callable<Void>()
{
+                            public Void call() throws Exception {
+                                pmex.replyWithFailure(FailureType.NO_RESPONSE, "Response
not received after " + _responseTimeout + "ms.", null);
+                                return null;
+                            }
+                        });
+                    } catch (Exception ex) {
+                        __log.error("Error executing transaction:  ", ex);
+                    }
                 }
-            });
-        } catch (Exception ex) {
-            __log.error("Error executing transaction:  ", ex);
-        }
-    }
             }
         }
     }



Mime
View raw message