You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anatoly Shein <as...@mercury.com> on 2004/11/16 13:26:45 UTC

handeling call timeout exception

Hi

We are using synchronous client to invoke the server API.

There is setTimeout method allows change socket timeout.

We like to use this to enable cancel operation for invoked call.

something like the following :

            

            call.setTimeout( 1000 );

boolean shouldContinue = true;

shouldCancel = false; // where shouldCancel variable accessible from another
thread.

            while ( shouldContinue ) {

                        try {

                                   call.invoke();

                        }

                        catch ( SocketTimeoutException e ) {

                                   shouldContinue = !ShouldCancel;

                        }

            } 

 

did you have any idea is it possible continue listen for answer invoke after
SocketTimeout was thrown ?

invoke just opens new socket.

 

thank you in advance

anatoly shein

 

 



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________