axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Winter <elmoakma...@yahoo.com>
Subject [Axis2] Reliable Notification
Date Wed, 12 Jul 2006 17:38:49 GMT
Reliable Notification

I have a pretty simple problem I'd like to solve, but the tool I think
I should use is not being cooperative.  

I have a client that has to deliver a message to at least one server
within a reasonable time.  

Based on that requirement I though I should use MEP InOnly and
Sandesha2 (Reliable Messaging).  The problem is that I need to know
that the message arrived and I can't seem to get that using Sandesha
and the InOnly pattern. All I really want from the service is an ACK
that I can pick up somehow at the client.  Clearly this is part and
parcel of what Sandesha does... I just want to know about it.

A couple of thoughts came up:
1. Manually check via the SequenceReport. (never see anything in the 
Outgoing Sequence Report)
2. Use a SandeshaListener (callbacks for onError and onTimeout).  I 
tried running client w/ server down. No luck.
3. SandeshaClient.waitUntilSequenceCompleted works but who wants to 
block?  And if it does time out I still want to be notified.

None of these fullfill the basic requirement: within a reasonable
about of time, I want to know, at the client, that the message has
been received at the service.



FYI I am using the Sandesha2 UserguideEchoClient client - the code w/ my 
additions are here.


        clientOptions.setTo(new EndpointReference (toEPR));
        ServiceClient serviceClient = new ServiceClient 
(configContext,null);
        clientOptions.setAction("urn:wsrm:Ping");
        serviceClient.setOptions(clientOptions);

       
 clientOptions.setProperty(SandeshaClientConstants.SANDESHA_LISTENER, 
new SandeshaListener_Impl());//new
        clientOptions.setTimeOutInMilliSeconds(1);//trying to cause it 
to timeout, but it doesn't.

        serviceClient.fireAndForget(getPingOMBlock("ping1"));
        serviceClient.fireAndForget(getPingOMBlock("ping2"));
        clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, 
"true");
        serviceClient.fireAndForget(getPingOMBlock("ping3"));
        
       
 SandeshaClient.waitUntilSequenceCompleted(serviceClient,1000*50);//new
        serviceClient.finalizeInvoke();


---------------------------------------------------------------------
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