cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <...@envoisolutions.com>
Subject Handling non-Client directed messages/AOP for Services & Clients
Date Tue, 24 Oct 2006 16:26:31 GMT
Hi Eoghan,
Yeah, it seems that the Apache mail had issues...

What you say makes sense. I have two additional thoughts:
1. There could be some error which would leave no Exception or no 
response objects in the Message, in which case it would qualify as a 
partial response and block. I think making some stronger mechanism would 
be beneficial. This mechanism would allow an interceptor to say "Don't 
actually send this message all the way to the client/server".
2. This is a general pattern beyond partial responses. It almost seems 
like we might want to create some higher level AOP like mechanism around 
operations/services (instead of a low level interceptor). For instance, 
if we are doing WS transactions, we might receive transaction messages 
on the Client.onMessage(), in which case we'd want to redirect it some 
where.

I'm not sure what such an AOP mechanism would look like or if there 
would be some additional interfaces/classes needed, but it seems like it 
might be a helpful thing. Thoughts?

- Dan

Glynn, Eoghan wrote:
>  
> Dan,
>
> I've made several attempts to send this, but for some reason its not
> showing up on the cxf-dev list.
>
> Apparently the Apache infrastructure had some downtime scheduled for
> last Saturday thru Monday. Dunno if this mail list flakiness is related.
>
>
> /Eoghan
>
> -----Original Message-----
> From: Glynn, Eoghan 
> Sent: 23 October 2006 13:54
> To: 'cxf-dev@incubator.apache.org'
> Subject: RE: Need Help with WS-A systest
>
>
> Dan,
>
> I'm just back from paternity leave, so I'm only seeing this mail now.
>
> Yes, the MAPAggreator does the correlation. This is the most natural
> place for it to be done, as the correlation is based on wsa:RelatesTo
> header.
>
> I don't agree with your point about partial response handling. First,
> partial responses are not necessarily exclusive to RM, other services
> could leverage this facility. Second, the related code in ClientImpl is
> simply there in order to distinguish partial from full responses, so
> that control is only returned to the invoking thread when the latter is
> available. Note that partial and full responses may arrive at the
> ClientImpl in either order. So this check is required and should not
> have been removed. Third, I don't see how a single line of code in
> ClientImpl.isPartialResponse() to check whether the inMessage has
> content of type List or Exception is any more complicated than setting a
> PARTIAL_RESPONSE property elsewhere and then checking whether this is
> set.
>
> /Eoghan
>
>   
>> -----Original Message-----
>> From: Dan Diephouse [mailto:dan@envoisolutions.com]
>> Sent: 18 October 2006 06:16
>> To: cxf-dev@incubator.apache.org
>> Subject: Need Help with WS-A systest
>>
>> I just committed a bunch of code to enable client side fault handling.
>>     
>
>   
>> I got side tracked with correlation, but then decided the crap that I 
>> wrote was completely unncessary as we're already doing correlation in 
>> MAPAggregator... Somewhere along the way I seem to have broken WS-A as
>>     
>
>   
>> the systest no longer passes, but I can't for the life of me figure 
>> out what I did.
>>
>> There were two main changes. First, I set things up so that the 
>> transport is responsible for correlating the exchange (if possible - 
>> obviously its not always). This means the transport needs to set both 
>> the message.exchange and exchange.inMessage. Setting the 
>> exchange.inMessage actually does both, so I switched everything to use
>>     
>
>   
>> that.
>>
>> Second, I removed the partial response handling from ClientImpl. As I 
>> said in the commit message, it seems that the ws-rm implementation 
>> should provide its own MessageObserver. Or at the very least, we 
>> should provide some better way of figuring out if its a partial 
>> response. One option woudl be setting a PARTIAL_RESPONSE property in 
>> the message.
>> Another would be creating a different message label - i.e. 
>> exchange.setMessage("partial", message) - and then we can test if the 
>> received message equals exchange.inMessage.
>> Regardless, I tried adding the partial response checking back in and 
>> it still didn't work.
>>
>> Can someone more familiar with the WS-A code help shed some light? I'm
>>     
>
>   
>> thoroughly stumped. Most likely I'm doing something insanely stupid 
>> :-)
>>
>> - Dan
>>
>> --
>> Dan Diephouse
>> (616) 971-2053
>> Envoi Solutions LLC
>> http://netzooid.com
>>
>>
>>
>>     


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog


Mime
View raw message