Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F28DF6CB7 for ; Thu, 4 Aug 2011 09:37:45 +0000 (UTC) Received: (qmail 54499 invoked by uid 500); 4 Aug 2011 09:37:39 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 53591 invoked by uid 500); 4 Aug 2011 09:37:22 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 53527 invoked by uid 99); 4 Aug 2011 09:37:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 09:37:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 209.85.213.173 as permitted sender) Received: from [209.85.213.173] (HELO mail-yx0-f173.google.com) (209.85.213.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 09:37:12 +0000 Received: by yxt3 with SMTP id 3so1104409yxt.32 for ; Thu, 04 Aug 2011 02:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gQy5pzlBfSi3TAq9tzOnt7SUNnbX9wO/nRWbdsE/1TA=; b=R776miM84ixm7eIX+g2Vk10S6KeRmF0bRl1bRszWMdbdMNkgcCsSOmB7p1TerSTWKd ya376XI4PNE896GyIfXOj0jESwGV+2KY8thD7RitQgEq7HfznAIOYbO0hFqv5/CckUij p9Eon7BVek/pxb+nrx0o9T7vpuDvKGFR8gzbE= MIME-Version: 1.0 Received: by 10.236.77.165 with SMTP id d25mr803419yhe.225.1312450611465; Thu, 04 Aug 2011 02:36:51 -0700 (PDT) Received: by 10.236.202.228 with HTTP; Thu, 4 Aug 2011 02:36:51 -0700 (PDT) In-Reply-To: <4E39EB21.3070800@gmail.com> References: <4E39EB21.3070800@gmail.com> Date: Thu, 4 Aug 2011 15:06:51 +0530 Message-ID: Subject: Re: Non blocking with two channel is broken From: Amila Suriarachchi To: java-dev@axis.apache.org Cc: java-user@axis.apache.org Content-Type: multipart/alternative; boundary=20cf30050d7e7b4eff04a9aab8c4 --20cf30050d7e7b4eff04a9aab8c4 Content-Type: text/plain; charset=ISO-8859-1 Do you mean this code if (messageCtx.isPropertyTrue(DO_ASYNC) || ((messageCtx.getParameter(DO_ASYNC) != null) && JavaUtils.isTrueExplicitly(messageCtx.getParameter(DO_ASYNC).getValue()))) { String mep = messageCtx.getAxisOperation() .getMessageExchangePattern(); EndpointReference replyTo = messageCtx.getReplyTo(); // In order to invoke the service in the ASYNC mode, the request // should contain ReplyTo header if the MEP of the service is not // InOnly type if ((!WSDLUtil.isOutputPresentForMEP(mep)) || (replyTo != null && !replyTo.hasAnonymousAddress())) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); messageCtx.getEnvelope().build(); messageCtx.getConfigurationContext().getThreadPool().execute( worker); return; } } It is there in the trunk. you need to use the public static final String DO_ASYNC = "messageReceiver.invokeOnSeparateThread"; at the server side. thanks, Amila. On Thu, Aug 4, 2011 at 6:13 AM, Deepal jayasinghe wrote: > Guys, > A user called "Todd" recently observed [1] that we have issues with > non-blocking invocation with two channels. I went and tested it and I was > able to re-create the issue. While debugging the code I realized that > something has gone wrong. IIRC for the server side we had a check for > replyTo header and if the replyTo is not Anonymous then we send the ACK > through the back channel. And once the invocation is complete we send the > reply through the replyTo address. However, while debugging the code I > realized that someone has removed those code, so now the logic does not > work. > > Since I went through the code after long time and not fully updated with > the source code, I could not able to find the exact location of the code. > So, if anyone of you have removed the code please let us know, then we can > fix it correctly. Else I have to fix it on the AbstractMessageReceiver. > > Thanks, > Deepal > > [1] https://issues.apache.org/jira/browse/AXIS2-5111 > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --20cf30050d7e7b4eff04a9aab8c4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Do you mean this code

if (messageCtx.isPropertyTrue(DO_ASYNC)
=A0= =A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 || ((messageCtx.getParameter(DO_ASYNC)= !=3D null) &&
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 JavaUtils.isTrueExplicitly(messageCtx.getParameter(DO_ASYNC).getV= alue()))) {

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 String mep =3D messageCtx.getAxisOper= ation()
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 .getMessageExc= hangePattern();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 EndpointReference replyTo = =3D messageCtx.getReplyTo();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 // In order t= o invoke the service in the ASYNC mode, the request
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 // should contain ReplyTo header if the MEP o= f the service is not
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 // InOnly type
=A0= =A0=A0 =A0=A0=A0 =A0=A0=A0 if ((!WSDLUtil.isOutputPresentForMEP(mep))
= =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 || (replyTo !=3D null &am= p;& !replyTo.hasAnonymousAddress())) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 AsyncMessageReceiverWorker worker = =3D new AsyncMessageReceiverWorker(
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 messageCtx);
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0= =A0=A0 messageCtx.getEnvelope().build();
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 = =A0=A0=A0 messageCtx.getConfigurationContext().getThreadPool().execute(
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 worker);
=A0= =A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 return;
=A0=A0=A0 =A0=A0=A0 =A0=A0= =A0 }
=A0=A0=A0 =A0=A0=A0 }

It is there in the trunk.

you = need to use the=A0 public static final String DO_ASYNC =3D "messageRec= eiver.invokeOnSeparateThread"; at the server side.

thanks,
Amila.

On Thu, Aug 4, 2011= at 6:13 AM, Deepal jayasinghe <deepalk@gmail.com> wrote:
=20 =20 =20
Guys,
A user called "Todd" recently observed [1] that we have issue= s with non-blocking invocation with two channels. I went and tested it and I was able to re-create the issue. While debugging the code I realized that something has gone wrong. IIRC for the server side we had a check for replyTo header and if the replyTo is not Anonymous then we send the ACK through the back channel. And once the invocation is complete we send the reply through the replyTo address. However, while debugging the code I realized that someone has removed those code, so now the logic does not work.

Since I went through the code after long time and not fully updated with the source code, I could not able to find the exact location of the code. So, if anyone of you have removed the code please let us know, then we can fix it correctly. Else I have to fix it on the AbstractMessageReceiver.

Thanks,
Deepal

[1] https://issues.apache.org/jira/browse/AXIS2-5111



--
Amila Suriarachchi
W= SO2 Inc.
blog: http://am= ilachinthaka.blogspot.com/
--20cf30050d7e7b4eff04a9aab8c4--