I will fix it. Reattempt is managed in the channel itself at a much lower level. That has always been the case. Adding reattempt here is ambiguous, so I will readjust the interface to return void.

best
Filip

On 2/10/2011 3:36 AM, Konstantin Kolinko wrote:
2011/2/9<fha...@apache.org>:
Author: fhanik
Date: Wed Feb  9 17:39:24 2011
New Revision: 1068989

URL: http://svn.apache.org/viewvc?rev=1068989&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50667
Move the callback outside try/catch to avoid duplicate callbacks

I do not quite get it.

JavaDoc comment for ExtendedRpcCallback#replyFailed(..) says
  @return true if the callback would like to reattempt the reply, false 
otherwise

In this code returning true will result in falling through and just a
duplicate call to the handler, now reporting success:
excallback.replySucceeded(rmsg.message, reply, sender);

I do not see any "reattempt" here.

Best regards,
Konstantin Kolinko

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1068989&r1=1068988&r2=1068989&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Wed Feb  
9 17:39:24 2011
@@ -158,9 +158,6 @@ public class RpcChannel implements Chann
                         channel.send(new Member[] {sender}, 
rmsg,replyMessageOptions&  ~Channel.SEND_OPTIONS_SYNCHRONIZED_ACK);
                     }
                     finished = true;
-                    if (excallback != null&&  !asyncReply) {
-                        excallback.replySucceeded(rmsg.message, reply, sender);
-                    }
                 }catch ( Exception x )  {
                     if (excallback != null&&  !asyncReply) {
                         finished = !excallback.replyFailed(rmsg.message, 
reply, sender, x);
@@ -169,6 +166,9 @@ public class RpcChannel implements Chann
                         log.error("Unable to send back reply in 
RpcChannel.",x);
                     }
                 }
+                if (finished&&  excallback != null&&  !asyncReply) {
+                    excallback.replySucceeded(rmsg.message, reply, sender);
+                }
             }
         }//end if
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3434 - Release Date: 02/10/11





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to