axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Mazzucco <Michele.Mazzu...@ncl.ac.uk>
Subject [Axis2] Asynchronous receiver misses messages
Date Thu, 17 Aug 2006 11:21:45 GMT
Hi all,

I'm experience a big problem when using an asynchronous (dual channel)
client: some messages are lost.
More formally, is the client has to wait for one message only, it works
fine, while if it has to wait for many responses some messages are lost
(please note that they are sent by the server). The callback receiver
I'm using is the following:

private static final class QospCallback extends Callback {

	private final int toReceive;

	private int received;

		
	QospCallback(int toSend) {
		this.toReceive = toSend;
		this.received = 0;
	}

		
	public void onComplete(AsyncResult result) {
		this.received++;
		if (log.isInfoEnabled()) {
		log.info("Received respose [" + 							(received) + "/" +
this.toReceive + "]");
		}
	} // -- onComplete()

	public void onError(Exception e) {
		this.received++;
		if (log.isEnabledFor(Level.ERROR)) {
			log.error("Failed to receive msg #" + 							this.received);
			logException(e);
		}
	} // -- onError()

	public void setComplete(boolean complete) {
		super.setComplete(this.received == 						this.toReceive);
	}

	public boolean isComplete() {
		return (this.received == this.toReceive);
	}

} // END QospCallback


The options used by the ServiceClient are just:

options.setUseSeparateListener(true);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

This (as expected) makes no difference for what concerns the message
delivery:
options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);

while this
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
prevent messages from beeing delivered




Any suggest would be appreciated,
Michele

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


Mime
View raw message