You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by fmireaux <mi...@organdia.com> on 2009/03/18 09:40:08 UTC

How to terminate a WS-RM sequence ?

Using WS-RM, is there a mean for a client to terminate a sequence, like
tagging a message as the last message ?
-- 
View this message in context: http://www.nabble.com/How-to-terminate-a-WS-RM-sequence---tp22574670p22574670.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: How to terminate a WS-RM sequence ?

Posted by Daniel Kulp <dk...@apache.org>.
On Wed March 18 2009 7:10:46 am fmireaux wrote:
> Thanks,
>
> But it seems to me that, in some cases, it's not a matter of configuration
> : a client program could want to indicate that a request is the last one of
> a series, letting RM interceptors do what they have to do with this
> information (beginning by using the lastmessage protocol header for the
> request as they do when max sequence length is reached).

Ran into the same issue with WS-SecureConversation.   I needed a way for the 
application to let the sec-conv runtime know to cancel the conversation token.  
I ended up just adding a property that could be set on the request context to 
let the runtime know to cancel it after the next request.  Something similar 
could be done for WSRM.

It's not ideal as you need to know ahead of time that the next request really 
is the last one.   You cannot really keep a pool around and "cleanup" the 
pool.   More work would be needed for that scenario.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: How to terminate a WS-RM sequence ?

Posted by Eoghan Glynn <eo...@gmail.com>.
Agreed, there's a case for supporting more explicit application level
control of sequence termination.

Can you add a JIRA to capture this requirement?

No guarantee as to if and when this will be fixed, but at least it won't
fall thru' the cracks if its in JIRA.

Cheers,
Eoghan


2009/3/18 fmireaux <mi...@organdia.com>

>
> Thanks,
>
> But it seems to me that, in some cases, it's not a matter of configuration
> :
> a client program could want to indicate that a request is the last one of a
> series, letting RM interceptors do what they have to do with this
> information (beginning by using the lastmessage protocol header for the
> request as they do when max sequence length is reached).
> --
> View this message in context:
> http://www.nabble.com/How-to-terminate-a-WS-RM-sequence---tp22574670p22576875.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: How to terminate a WS-RM sequence ?

Posted by fmireaux <mi...@organdia.com>.
Thanks,

But it seems to me that, in some cases, it's not a matter of configuration : 
a client program could want to indicate that a request is the last one of a
series, letting RM interceptors do what they have to do with this
information (beginning by using the lastmessage protocol header for the
request as they do when max sequence length is reached).
-- 
View this message in context: http://www.nabble.com/How-to-terminate-a-WS-RM-sequence---tp22574670p22576875.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: How to terminate a WS-RM sequence ?

Posted by Eoghan Glynn <eo...@gmail.com>.
BTW, not all the config options I referred to earlier seem to be covered in
the CXF docco <http://cwiki.apache.org/CXF20DOC/wsrmconfiguration.html>
Have a look at the SequenceTerminationPolicyType in the
schema<http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager-types.xsd?view=markup>for
more details.

Cheers,
Eoghan


> Well there are several ways to set up the configuration such that a
> TerminateSequence is sent under ceratin circumstances, for example:
>
> - after a certain number of messages have been sent
> - when a certain number of messages remain unACKed
> - when the SequenceAcknowledgement reaches a certain degree of
> fragmentation into ranges separate by holes in the message stream
> - on the expiry of an inactivity timeout.
>

RE: How to terminate a WS-RM sequence ?

Posted by Eoghan Glynn <eo...@progress.com>.

Well there are several ways to set up the configuration such that a TerminateSequence is sent under ceratin circumstances, for example:

- after a certain number of messages have been sent
- when a certain number of messages remain unACKed
- when the SequenceAcknowledgement reaches a certain degree of fragmentation into ranges separate by holes in the message stream
- on the expiry of an inactivity timeout.

We don't really provide a user-oriented programmatic mechanism for forcing termination though. Now you could tarverse the interceptor chain from the proxy, down-cast to the relevant RM interceptor and use the internal APIs to force the termination. However this approach would not be recommended as it is likely to be fragile. There are a number of non-obvious things that need to be done prior to termination in some circumstances, to ensure the best chance of a graceful shutdown. 

Cheers,
Eoghan

-----Original Message-----
From: fmireaux [mailto:mireaux@organdia.com]
Sent: Wed 18/03/2009 08:40
To: users@cxf.apache.org
Subject: How to terminate a WS-RM sequence ?
 

Using WS-RM, is there a mean for a client to terminate a sequence, like
tagging a message as the last message ?
-- 
View this message in context: http://www.nabble.com/How-to-terminate-a-WS-RM-sequence---tp22574670p22574670.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to terminate a WS-RM sequence ?

Posted by fmireaux <mi...@organdia.com>.
JIRA issue CXF-2118 created.
-- 
View this message in context: http://www.nabble.com/How-to-terminate-a-WS-RM-sequence---tp22574670p22578188.html
Sent from the cxf-user mailing list archive at Nabble.com.