Glen, No. A "fresh" interceptor chain is used for each invocation. Thus, during the processing of the message, you can muck with is all you want and would have no impact on future invocations.
Dan On Monday 18 February 2008, Glen Mazza wrote: > Dan, > > We're looking at the second option you gave below right now, but I > have a question on the first. If I grabbed the InterceptorChain below > as you say and modified it, would *all* subsequent web service > requests use that modified interceptor chain (which I don't want), or > would the business logic in interceptor A be activated each time, > letting it decide whether to continue on ->B->C->D (the default) or > ->E->F->G (the alternative as decided by A) (which I do want)? > > Thanks, > Glen > > PS - please forward your response to CXF-User, I'm operating outside > of Nabble right now. > > On Feb 18, 2008 10:23 AM, Daniel Kulp <[EMAIL PROTECTED]> wrote: > > Glen, > > > > On Monday 18 February 2008, Glen Mazza wrote: > > > Can I program an interceptor in a web service's incoming > > > interceptor chain to dynamically route to another interceptor > > > other than the one predefined in its chain (and ignore all > > > subsequent interceptors in the predefined chain)? > > > > Kind of yes. > > > > Basically, there are a couple ways to do it. One option is to grab > > the current InterceptorChain and remove everything you don't want > > (or comes after your interceptor). I believe you can just get the > > Iterator from the chain and use the remove methods on that. I think > > they are implemented. Then add in everything you do want. > > > > Another option is to create a whole new chain (you could have chains > > cached with the PhaseChainCache stuff) with the new stuff you want. > > In your interceptor, you would pause the current chain (so nothing > > else would get called later) and then call > > newChain.processmessage(msg); > > > > Dan > > > > > In other words, for an interceptor chain A->B->C->D, can I add > > > business logic in interceptor A for it to route to A->E->F->G > > > instead? In particular, I would like to avoid it doing > > > A->E->F->G->B->C->D if I can, i.e., once I reroute, I don't want > > > it to return to the other interceptors in the predefined chain. > > > > > > Thanks, > > > Glen > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
