ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: Sandesha2 In Only services.
Date Mon, 06 Oct 2008 09:46:07 GMT
I had a look at the messages being passed using tcp mon. I am using Axis2
trunk and Sandesha2 trunk code.

Then I saw the following create sequence message for above mentioned test
case

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header>
         <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://localhost:8088/axis2/services/TestInService</wsa:To>
         <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing
">urn:uuid:27F1F5DC8E075DB6191223285847424</wsa:MessageID>
         <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
         <wsrm:CreateSequence xmlns:wsrm="
http://schemas.xmlsoap.org/ws/2005/02/rm">
            <wsrm:AcksTo>
               <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing
">http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
            </wsrm:AcksTo>
            <wsrm:Offer>

<wsrm:Identifier>urn:uuid:27F1F5DC8E075DB6191223285847439</wsrm:Identifier>
            </wsrm:Offer>
         </wsrm:CreateSequence>
      </soapenv:Body>
   </soapenv:Envelope>

Although this is an inonly message sequence Sandesha2 has set an Offer. This
is wrong. Sansesha2 server is not
checking for this but if someone try to interoperate with the .Net that will
give exceptions for these.

thanks,
Amila.

On Mon, Oct 6, 2008 at 2:59 PM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:

> hi,
>
> I wrote an InOnly service and tried to invoke it using the following
> client.
>
> ConfigurationContext configurationContext =
>
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(
>                             AXIS2_REPOSITORY_LOCATION,
> AXIS2_CLIENT_CONFIG_FILE);
>             ServiceClient serviceClient = new
> ServiceClient(configurationContext, null);
>             serviceClient.setTargetEPR(new EndpointReference("
> http://localhost:8088/axis2/services/TestInService"));
>             serviceClient.getOptions().setAction("urn:TestInOperation");
>             serviceClient.engageModule("sandesha2");
>             serviceClient.getOptions().setUseSeparateListener(true);
>
> serviceClient.getOptions().setProperty(SandeshaClientConstants.INTERNAL_SEQUENCE_ID,
> "key1");
>             System.out.println("Invoke client using thread ==> " +
> Thread.currentThread().getName());
>             for (int i = 1; i < 100; i++) {
>                 serviceClient.fireAndForget(getTestOMElement(i));
>                 try {
>                     Thread.sleep(1000);
>                 } catch (InterruptedException e) {
>                 }
>             }
>
> serviceClient.getOptions().setProperty(SandeshaClientConstants.LAST_MESSAGE,
> Constants.VALUE_TRUE);
>             serviceClient.fireAndForget(getTestOMElement(11));
>
> The sequence went fine. But although I have set
> serviceClient.getOptions().setUseSeparateListener(true); Sandesha2 send and
> receive messages in same channel.
>
> So how can I set it to work in dual channel (i.e with addressing reply to)?
>
> Then I do the above test randomly starting and stopping the tcp channel
> using the Tcp mon. Sandesha2 could recover messages and
> every thing worked fine. Then I start the client without starting the
> sequence and the server started after some time. In this case it
> could not recover messages. I did not make any changes to module.xml so I
> believe  it uses default value.
> Has any one face this problem?
>
> Finally I saw this in sandesha2 module.xml this,
>
> <sandesha2:StorageManagers>
>
>                     <sandesha2:InMemoryStorageManager>
>
> org.apache.sandesha2.storage.inmemory.InMemoryStorageManager
>                     </sandesha2:InMemoryStorageManager>
>
>                     <sandesha2:PermanentStorageManager>
>
> org.apache.sandesha2.storage.inmemory.InMemoryStorageManager
>                     </sandesha2:PermanentStorageManager>
>
>                 </sandesha2:StorageManagers>
>
> What is the purpose of having two storage managers? Isn't this cause
> problems in handling transactions?
>
> Can someone please help me figuring out these issues?
>
> thanks,
> Amila.
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Mime
View raw message