Hi Dasarath,

This is a farley standard design when it comes to message ordering where the messages are queued and sorted first and then use a pulling mechanism to invoke services. The other option we have is to keep the thread blocked till Sandesha receive the missing messages. However this is not a good design because it may lead to exhaustion of the containers thread pool with several un-ordered messages.(Every thread is waiting for some message to arrive)

As a verification see how the WCF is handling this.
http://wcf.netfx3.com/content/IntroductiontoReliableMessagingwiththeWindowsCommunicationFoundation.aspx

So, seems like we need another transaction inside the engine.

Thanks,
Jaliya



----- Original Message ----- From: "Dasarath Weeratunge" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, July 18, 2006 8:55 PM
Subject: Fwd: Re: kandula and sandesha




----- Forwarded message from Dasarath Weeratunge <[EMAIL PROTECTED]> -----
   Date: Tue, 18 Jul 2006 20:54:10 -0400
   From: Dasarath Weeratunge <[EMAIL PROTECTED]>
Reply-To: Dasarath Weeratunge <[EMAIL PROTECTED]>
Subject: Re: kandula and sandesha
     To: Jaliya Ekanayake <[EMAIL PROTECTED]>, Jaliya Ekanayake
<[EMAIL PROTECTED]>

Quoting Jaliya Ekanayake <[EMAIL PROTECTED]>:

This is how they work now. Sandesha Sender is the last to run in the handler

chain and it acts as a transport to axis engine.So client side has no
problem in the current configuration except that Sandesha needs to find a
way to ignore the wsdd file in the classpath, which is doable.


so once we figure this out there shouldn't be a problem on the client
side.

>
> On the server side, can we have sandesha handlers run first? Is it
> possible to
> arrange sandesha to run some handlers (say service specific handlers) > just
> before the RM provider invokes the service? Here the changes made by
> kandula
> handlers to the thread's context should be visible to the service.
>
Currently any service specific handler will be invoked before the
RMProvider. RMProvider is the last component in the handler chain.
However RMProvider uses a threads to invoke the service so the initial
thread's context will not be visible to the service.

Just to be certain, so you are saying that the handlers run on one thread and the service is invoked on a different thread? Can we not have handlers (all handlers except RM) and the service on the same thread-- without lot of trouble
as things are? We may be able to fix the problem with kandula but
even security I think associates certain parameters with threads, so the same
problem might arise again in a different context under this arrangement.

thanks,
--dasarath






> thanks,
> --dasarath
>
>
>>
>> I don't think we can find an alternative in Axis1.x to implement WS-RM
>> without using threads.
>>
>> Thanks,
>> -Jaliya
>>
>>
>> ----- Original Message ----- >> From: "Dasarath Weeratunge" <[EMAIL PROTECTED]>
>> To: "Jaliya Ekanayake" <[EMAIL PROTECTED]>; "Jaliya Ekanayake"
>> <[EMAIL PROTECTED]>
>> Cc: <[email protected]>
>> Sent: Tuesday, July 18, 2006 1:21 AM
>> Subject: Re: kandula and sandesha
>>
>>
>> > Quoting Jaliya Ekanayake <[EMAIL PROTECTED]>:
>> >
>> > Hi Jaliya,
>> >
>> > How does Sandesha handle threads? Kandula makes this assumption that
>> > it will be the same thread that runs handlers that will also invoke >> > the
>> > service on the server side. On the client side it is assumed again
>> > that it will be the same thread that user invokes the stubs that >> > will >> > drive the handler chain. If these conditions are not met then the >> > whole
>> > thing will come down!
>> >
>> > regards,
>> > --dasarath
>> >
>> >
>> >
>> >> Hi All,
>> >>
>> >> I think still the problem is with the configuration. We need a way >> >> to
>> >> inform
>> >>
>> >> Sandesha sender (that uses Call) to ignore the client-config.wsdd >> >> that

>> >> is
>>
>> >> in
>> >>
>> >> the classpath.
>> >> So the problem is to find a way to inform Call object not to use >> >> the
>> >> client-config.wsdd.
>> >>
>> >> The scenario is this.
>> >>
>> >> In the client side the order of message flow is as follows for the
>> >> IDEAL
>> >> case:
>> >>
>> >> Client --> (Req 1) --> Kandula --(Modified Req 1) --> >> >> andesha -->
>> >> CreateSequence
>> >>
>> >> <-- CreateSequenceResponse
>> >>
>> >>
>> >>                              --> Modified Req 1
>> >>
>> >> But since Sandesha again sees the client-config.wsdd in the >> >> classpath
>> >> order
>> >> will become this.
>> >>
>> >> Client --> (Req 1) --> Kandula --(Modified Req 1) --> >> >> andesha -->
>> >> (CreateSequence ) -- Going through Kandula Again --> .....
>> >>
>> >> So if anyone know how to inform the axis engine not read the
>> >> configuration
>> >> from the client-config.wsdd then we can find a solution to the >> >> above.
>> >>
>> >> Thanks,
>> >> -Jaliya
>> >>
>> >> ----- Original Message ----- >> >> From: "Hannes Erven" <[EMAIL PROTECTED]>
>> >> To: "Valerio Vianello" <[EMAIL PROTECTED]>
>> >> Cc: <[email protected]>
>> >> Sent: Monday, July 17, 2006 8:44 AM
>> >> Subject: Re: kandula and sandesha
>> >>
>> >>
>> >> > Hi Valerio,
>> >> >
>> >> >
>> >> > Please show us your code for all your web services that are
>> >> > involved.
>> >> >
>> >> >
>> >> > thanks
>> >> >
>> >> > -hannes
>> >> >
>> >> >
>> >> > PS.: Please keep replies on the list.
>> >> >
>> >> >
>> >> > Valerio Vianello wrote:
>> >> >
>> >> >> Hi Hannes,
>> >> >> my goal is to develop an example using both kandula and >> >> >> sandesha
>> >> >> on
>> >> >> axis
>> >>
>> >> >> 1.3
>> >> >> I've made a client that calls a service A which in turn invokes >> >> >> a >> >> >> service B in a reliabile and transactional way (the invoke to >> >> >> the
>> >> >> service
>> >>
>> >> >> B done by the service A is done in the part of the code that I >> >> >> send
>> >> >> you
>> >> >> before).
>> >> >> I've used separately both frameworks and all seem to work, but >> >> >> then

>> >> >> I
>> >> >> tried to
>> >> >> join kandula and sandesha I have an error
>> >> >>  First I had this error:
>> >> >> org.apache.axis.types.URI$MalformedURIException:
>> >>
>> >> >> Cannot initialize URI with empty parameters
>> >> >>  then Jaliya (sandesha developer) sended me a new version of
>> >> >> sandesha
>> >> >> and
>> >>
>> >> >> the error became :
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ==========
>> >> >> [CallbackRegistry] registerCallback: timeout= 180000
>> >> >> [ATCoordinatorImpl] timeout ACTIVE
>> >> >> org.apache.kandula.coordinator.TimedOutException
>> >> >>  at
>> >> >>
>> >> org.apache.kandula.coordinator.at.ATCoordinatorImpl.timeout
>> > (ATCoordinatorImpl.java:626)
>> >> >>  at
>> >> >>
>> >> org.apache.kandula.coordinator.CallbackRegistry$1.run
>> > (CallbackRegistry.java:62)
>> >> >>  at java.util.TimerThread.mainLoop(Timer.java:512)
>> >> >>  at java.util.TimerThread.run(Timer.java:462)
>> >> >> catch CoordinatoreInvoke-> Inactivity Timeout Reached, No >> >> >> Response
>> >> >> from
>> >> >> the Server
>> >> >> AxisFault
>> >> >>  faultCode:
>> >> >> {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>> >> >>  faultSubcode:
>> >> >>  faultString: Inactivity Timeout Reached, No Response from the
>> >> >> Server
>> >> >>  faultActor:
>> >> >>  faultNode:
>> >> >>  faultDetail:
>> >> >>  {http://xml.apache.org/axis/}stackTrace:Inactivity Timeout
>> >> >> Reached,
>> >> >> No
>> >> >> Response from the Server
>> >> >> at >> >> >> org.apache.sandesha.client.RMSender.invoke(RMSender.java:125)
>> >> >>  at
>> >> >>
>> >> org.apache.axis.strategies.InvocationStrategy.visit
>> > (InvocationStrategy.java:32)
>> >> >>  at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ===============
>> >> >>  I used for the client the following client config wsdd file:
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ===============
>> >> >>
>> >> >> <!-- a barebone jboss.net/axis client configuration which >> >> >> includes
>> >> >> some
>> >> >> basic typemappings related to jboss -->
>> >> >>
>> >> >> <deployment name="defaultClientConfig"
>> >> >>
>> >> >> xmlns="http://xml.apache.org/axis/wsdd/";
>> >> >>
>> >> >> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>> >> >>
>> >> >> <globalConfiguration>
>> >> >>
>> >> >> <parameter name="adminPassword" value="admin"/>
>> >> >>
>> >> >> <parameter name="enableNamespacePrefixOptimization" >> >> >> value="true"/>
>> >> >>
>> >> >> <parameter name="disablePrettyXML" value="true"/>
>> >> >>
>> >> >> <parameter name="sendMultiRefs" value="true"/>
>> >> >>
>> >> >> <parameter name="sendXsiTypes" value="true"/>
>> >> >>
>> >> >> <parameter name="attachments.implementation"
>> >> >> value="org.apache.axis.attachments.AttachmentsImpl"/>
>> >> >>
>> >> >> <parameter name="sendXMLDeclaration" value="true"/>
>> >> >>
>> >> >> <requestFlow>
>> >> >>
>> >> >> <handler
>> >> >>
>> type="java:org.apache.axis.message.addressing.handler.AddressingHandler"
>> >> >> />
>> >> >>
>> >> >> <handler type="java:org.apache.kandula.coordinator.at.TxHandler" >> >> >> />
>> >> >>
>> >> >> </requestFlow>
>> >> >>
>> >> >> <responseFlow>
>> >> >>
>> >> >> <handler
>> >> >>
>> type="java:org.apache.axis.message.addressing.handler.AddressingHandler"
>> >> >> />
>> >> >>
>> >> >> </responseFlow>
>> >> >>
>> >> >> </globalConfiguration>
>> >> >>
>> >> >> <handler name="RMSender"
>> >> >> type="java:org.apache.sandesha.client.RMSender"/>
>> >> >>
>> >> >> <transport name="local"
>> >> >> pivot="java:org.apache.axis.transport.local.LocalSender"/>
>> >> >>
>> >> >> <transport name="java"
>> >> >> pivot="java:org.apache.axis.transport.java.JavaSender"/>
>> >> >>
>> >> >> <transport name="http"
>> >> >> pivot="java:org.apache.axis.transport.http.HTTPSender"/>
>> >> >>
>> >> >> <transport name="RMTransport" pivot="RMSender"/>
>> >> >>
>> >> >> <typeMapping
>> >> >>
>> >> >> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";
>> >> >>
>> >> >> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>> >> >>
>> >> >> encodingStyle=""
>> >> >>
>> >> >> qname="wsa:EndpointReference"
>> >> >>
>> >> >> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>> >> >>
>> >> >>
type="java:org.apache.axis.message.addressing.EndpointReferenceType"/>
>> >> >>
>> >> >> <typeMapping
>> >> >>
>> >> >> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";
>> >> >>
>> >> >> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>> >> >>
>> >> >> encodingStyle=""
>> >> >>
>> >> >> qname="wsa:ReferencePropertiesType"
>> >> >>
>> >> >> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>> >> >>
>> >> >>
>> type="java:org.apache.axis.message.addressing.ReferencePropertiesType"/>
>> >> >>
>> >> >> <typeMapping
>> >> >>
>> >> >> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";
>> >> >>
>> >> >>
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
>> >> >>
>> >> >> encodingStyle=""
>> >> >>
>> >> >> qname="wsa:Address"
>> >> >>
>> >> >> serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
>> >> >>
>> >> >> type="java:org.apache.axis.message.addressing.Address"/>
>> >> >>
>> >> >> <typeMapping
>> >> >>
>> >> >> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";
>> >> >>
>> >> >>
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
>> >> >>
>> >> >> encodingStyle=""
>> >> >>
>> >> >> qname="wsa:PortType"
>> >> >>
>> >> >> serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
>> >> >>
>> >> >> type="java:org.apache.axis.message.addressing.PortType" />
>> >> >>
>> >> >> <typeMapping
>> >> >>
>> >> >> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";
>> >> >>
>> >> >>
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
>> >> >>
>> >> >> encodingStyle=""
>> >> >>
>> >> >> qname="wsa:ServiceNameType"
>> >> >>
>> >> >> serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
>> >> >>
>> >> >> type="java:org.apache.axis.message.addressing.ServiceNameType" >> >> >> />
>> >> >>
>> >> >> </deployment>
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > =================
>> >> >>
>> >> >>  for the service A the following deploy wsdd file:
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ==================
>> >> >>
>> >> >>  <deployment xmlns="http://xml.apache.org/axis/wsdd/";
>> >> >>
>> >> >> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>> >> >>
>> >> >> <service name="Coordinatore" provider="java:RPC">
>> >> >>
>> >> >> <parameter name="wsdlTargetNamespace"
>> >> >> value="urn:kandulaClient/Coordinatore"/>
>> >> >>
>> >> >> <parameter name="wsdlServiceElement" >> >> >> value="CoordinatoreService"/>
>> >> >>
>> >> >> <parameter name="wsdlServicePort" value="Coordinatore"/>
>> >> >>
>> >> >> <parameter name="className" value="kandulaClient.Coordinatore"/>
>> >> >>
>> >> >> <parameter name="wsdlPortType" value="Coordinatore"/>
>> >> >>
>> >> >> <parameter name="typeMappingVersion" value="1.2"/>
>> >> >>
>> >> >> <operation name="avvia" qname="operNS:avvia"
>> >> >> xmlns:operNS="urn:kandula/Coordinatore"
>> >> >> soapAction="http://localhost:8080/axis/services/kandulaClient#avvia";

>> >> >>  >
>> >> >>
>> >> >> <parameter qname="in0" type="tns:int"
>> >> >> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>> >> >>
>> >> >> </operation>
>> >> >>
>> >> >> <parameter name="allowedMethods" value="*"/>
>> >> >>
>> >> >> </service>
>> >> >>
>> >> >> <service name="RMService" provider="Handler">
>> >> >>
>> >> >> <requestFlow>
>> >> >>
>> >> >> <handler
>> >> >>
>> >>
>> >
>>
>

type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>
>> >> >>
>> >> >> <handler
>> >> >>
>> >>
>> >
>>
>

type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handl
>> > er>
>> >> >>
>> >> >> </requestFlow>
>> >> >>
>> >> >> <parameter name="handlerClass"
>> >> >> value="org.apache.sandesha.ws.rm.providers.RMClientProvider"/>
>> >> >>
>> >> >> <parameter name="className"
>> >> >> value="org.apache.sandesha.client.RMService"/>
>> >> >>
>> >> >> <parameter name="allowedMethods" value="*"/>
>> >> >>
>> >> >> <parameter name="scope" value="request"/>
>> >> >>
>> >> >> </service>
>> >> >>
>> >> >> </deployment>
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ===================================0
>> >> >>
>> >> >>  and for the service B the following:
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > ===========================
>> >> >>
>> >> >> <deployment xmlns="http://xml.apache.org/axis/wsdd/";
>> >> >> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>> >> >>
>> >> >> <service name="Servizio1" provider="Handler">
>> >> >>
>> >> >> <parameter name="wsdlTargetNamespace"
>> >> >> value="urn:kandulaServizio1/Servizio1"/>
>> >> >>
>> >> >> <parameter name="wsdlServiceElement" value="Servizio1Service"/>
>> >> >>
>> >> >> <parameter name="wsdlServicePort" value="Servizio1"/>
>> >> >>
>> >> >> <parameter name="className" value="kandulaServizio1.Servizio1"/>
>> >> >>
>> >> >> <parameter name="wsdlPortType" value="Servizio"/>
>> >> >>
>> >> >> <parameter name="typeMappingVersion" value="1.2"/>
>> >> >>
>> >> >> <operation name="somma" qname="operNS:somma"
>> >> >> xmlns:operNS="urn:kandula/Coordinatore" >> >> >> returnQName="sommaReturn" >> >> >> returnType="rtns:int" >> >> >> xmlns:rtns="http://www.w3.org/2001/XMLSchema";
>> >> >>
soapAction="http://localhost:8080/axis/services/kandulaServizio1#somma";
>>
>> >> >>  >
>> >> >>
>> >> >> <parameter qname="in0" type="tns:int"
>> >> >> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>> >> >>
>> >> >> <parameter qname="in1" type="tns:int"
>> >> >> xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
>> >> >>
>> >> >> </operation>
>> >> >>
>> >> >> <parameter name="allowedMethods" value="*"/>
>> >> >>
>> >> >> <requestFlow>
>> >> >>
>> >> >> <handler
>> >> >>
>> >>
>> >
>>
>

type="java:org.apache.sandesha.ws.rm.handlers.RMServerRequestHandler"></handler>
>> >> >>
>> >> >> <handler
>> >> >>
>> >>
>> >
>>
>

type="java:org.apache.axis.message.addressing.handler.AddressingHandler"></handl
>> > er>
>> >> >>
>> >> >> </requestFlow>
>> >> >>
>> >> >> <parameter name="handlerClass"
>> >> >> value="org.apache.sandesha.ws.rm.providers.RMProvider"/>
>> >> >>
>> >> >> </service>
>> >> >>
>> >> >> </deployment>
>> >> >>
>> >> >>
>> >>
>> >
>>
>

================================================================================
>> > =================================
>> >> >>  What's wrong ?
>> >> >>  Thanks Valerio
>> >> >>  ----- Original Message -----
>> >> >> From: "Hannes Erven" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
>> >> >> To: "Valerio Vianello" <[EMAIL PROTECTED]
>> >> >> <mailto:[EMAIL PROTECTED]>>
>> >> >> Cc: <[email protected] >> >> >> <mailto:[email protected]>>
>> >> >> Sent: Monday, July 17, 2006 12:58 PM
>> >> >> Subject: Re: kandula and sandesha
>> >> >>
>> >> >>  > Hi Valerio,
>> >> >>  >
>> >> >>  >
>> >> >>  >> [CallbackRegistry] registerCallback: timeout= 180000
>> >> >>  >> [ATCoordinatorImpl] timeout ACTIVE
>> >> >>  >> org.apache.kandula.coordinator.TimedOutException
>> >> >>  >> at
>> >> >>  >>
>> >> >>
>> >> org.apache.kandula.coordinator.at.ATCoordinatorImpl.timeout
>> > (ATCoordinatorImpl.java:626)
>> >>
>> >> >>  >>
>> >> >>  >> at
>> >> >>  >>
>> >> >>
>> >> org.apache.kandula.coordinator.CallbackRegistry$1.run
>> > (CallbackRegistry.java:62)
>> >>
>> >> >>  >
>> >> >>  >
>> >> >>  > Can you please explain to us what your service is doing? It
>> >> >> seems
>> >> >> that
>> >> >>  > the connection to the kandula coordinator is OK.
>> >> >>  >
>> >> >>  >
>> >> >>  > -hannes
>> >> >>  >
>> >> >>
>> >> >>  >
>> ---------------------------------------------------------------------
>> >> >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> <mailto:[EMAIL PROTECTED]>
>> >> >> > For additional commands, e-mail: >> >> >> [EMAIL PROTECTED]
>> >> >> <mailto:[EMAIL PROTECTED]>
>> >> >>  >
>> >> >
>> >> >
>> >> >
---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





----- End forwarded message -----



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to