HiSimon,
Is there any sample for SCA 1.x? We are limited to IBM implementation which
is 1.x.

Thanks
Matt

On Tue, Jan 24, 2012 at 9:23 AM, Simon Laws <[email protected]>wrote:

> On Mon, Jan 23, 2012 at 9:15 PM, Matt Madhavan <[email protected]>
> wrote:
> > Hello,
> > I have an SCA binding that reads a message from a JMS Queue
> > (REQUEST_QUEUE)invokes a bean and sends the reply to another JMS
> > Queue(RESPONSE_QUEUE).
> >
> > Sometimes the message sender adds a replyTo Destinationmessage header
> value
> > (Lets say OTHER_RESPONSE_QUEUE). This 'overrides' my RESPONSE_QUEUE.
> >
> > I would like an example where I can filter this Header value to that the
> > reply gets put in RESPONSE_QUEUE and not in  OTHER_RESPONSE_QUEUE.
> >
> > Can some one please point me to an example please?
> >
> > Thanks in advance!
> >
> > Matt Madhavan
>
> Hi Matt
>
> I don't remember that there is a specific example like this but you
> could do it I think by dropping in a binding interceptor using a
> policy. There is a header policy for JMS you could take a look at [1]
> but I'm a little confused as the interceptor doesn't seem to do
> anything useful at the moment. The comment suggest that the processing
> happens elsewhere. There is a test for this policy [2]. You could
> write a policy specifically for redirecting the response.
>
> The basic idea of this is that you write an policy interceptor (that
> has access to the JMS message). To get this interceptor in the right
> place you then write appropriate policy configuration to tell the
> runtime to apply the policy to the service you are interested in. I
> can give you the basic steps if looking at the code doesn't help.
>
> Simon
>
> [1]
> http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/policy/header/
> [2]
> http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/testing/itest/jms/policy-headers/
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

Reply via email to