axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharath Reddy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4085) While loop doesnot exit while running echo non blocking client
Date Mon, 09 Feb 2009 09:14:59 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671772#action_12671772
] 

Sharath Reddy commented on AXIS2-4085:
--------------------------------------

I also noticed this issue in the release 1.4.1. 

The problem is that onComplete is not being called by NonBlockingInvocationWorker when the
user uses AxisCallback interface:

} finally {
                if (callback != null) {
                    callback.setComplete(true);
                }
}

When we make this change, it works:

} finally {
                if (callback != null) {
                    callback.setComplete(true);
                } else {
                	axisCallback.onComplete();
                }
}

I checked the latest Axis source code, and it looks like this has been fixed. So it should
work for the next release;

http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?r1=637413&r2=656721







> While loop doesnot exit while running echo non blocking client 
> ---------------------------------------------------------------
>
>                 Key: AXIS2-4085
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4085
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.4.1
>         Environment: Windows XP Professional Vesion 2002 SP-2 , NetBeans 6.1
>            Reporter: Akhila
>            Priority: Critical
>
> public class EchoNonBlockingClient {
>     private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/MyService");
>     public static void main(String[] args) {
>         ServiceClient sender = null;
>         try {
>             OMElement payload = ClientUtil.getEchoOMElement();
>             Options options = new Options();
>             options.setTo(targetEPR);
>             options.setAction("urn:echo");
>           TestCallback axisCallback = new TestCallback( " Call Back 1 "  ) ;
>              sender = new ServiceClient();
>             sender.setOptions(options);
>             sender.sendReceiveNonBlocking( payload, axisCallback );
>             //Wait till the callback receives the response.
>            while (  ! axisCallback.isComplete( ) )  {
>               Thread.sleep(1000);
>             }
> While running  this program ( echo-nonblocking client ( using axisCallback interface
instead of Callback ) )  , it goes to infinite loop in     while (  ! axisCallback.isComplete(
) )  {
>               Thread.sleep(1000);
>             }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message