From 4b6635a90c55c29ae3680c9cce6c692dfdbe2ad6 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 9 Nov 2010 17:08:25 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50184 Add an option to the RpcChannel to enable the Channel send options to be set for the reply message. Based on a patch by Ariel. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1033102 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/tribes/group/RpcChannel.java | 13 +++++++++++-- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/tribes/group/RpcChannel.java b/java/org/apache/catalina/tribes/group/RpcChannel.java index 37b650a37..6fddeb151 100644 --- a/java/org/apache/catalina/tribes/group/RpcChannel.java +++ b/java/org/apache/catalina/tribes/group/RpcChannel.java @@ -44,7 +44,8 @@ public class RpcChannel implements ChannelListener{ private Channel channel; private RpcCallback callback; private byte[] rpcId; - + private int replyMessageOptions = 0; + private HashMap responseMap = new HashMap(); /** @@ -130,7 +131,8 @@ public class RpcChannel implements ChannelListener{ rmsg.reply = true; rmsg.message = reply; try { - channel.send(new Member[] {sender}, rmsg,0); + channel.send(new Member[] {sender}, rmsg, + replyMessageOptions & ~Channel.SEND_OPTIONS_SYNCHRONIZED_ACK); }catch ( Exception x ) { log.error("Unable to send back reply in RpcChannel.",x); } @@ -178,7 +180,14 @@ public class RpcChannel implements ChannelListener{ this.rpcId = rpcId; } + public int getReplyMessageOptions() { + return replyMessageOptions; + } + public void setReplyMessageOptions(int replyMessageOptions) { + this.replyMessageOptions = replyMessageOptions; + } + /** * * Class that holds all response. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index de041b0e2..68d57b28f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -163,6 +163,11 @@ If maxInactiveInterval is negative, an access message is not sending. (kfujino) + + 50184: Add an option to the RpcChannel to enable the Channel + send options to be set for the reply message. Based on a patch by Ariel. + (markt)) + -- 2.11.0