You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bo...@apache.org on 2007/10/19 15:08:51 UTC
svn commit: r586418 -
/ode/branches/APACHE_ODE_1.1/jbi/src/main/java/org/apache/ode/jbi/OdeConsumerAsync.java
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);
- }
- }
}
}
}