You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Michele Mazzucco <Mi...@ncl.ac.uk> on 2008/03/06 15:50:11 UTC

About adding callback interface to deal with errors in async environment

Hello everybody,

I have spent some time thinking about how to fix bug AXIS2-3428 [1].  
The problem occurs when fireAndForget() fails to send a message and  
the HTTP NIO sender is used. If this is the case, the message  
receiver is null (the sender is not waiting any response) and there  
is no way to notify the application (even if the URL is wrong!)  
because the send is performed by a different thread.
My idea is to add an interface like this

interface ErrorCallback() {
	error(Exception e);
}

The ErrorCallback interface may be implemented at the application  
level (or by the Service/OperationClient) and a reference to it might  
be stored inside the message context (the message receiver is stored  
into the message context too). This way it would be possible to  
"bypass" the (null) message receiver and propagate the error -- no  
matter what the MEP is.

Any thoughts?
Michele


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

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org