Hi Mike,

gerne doch ;-)

Am 22.03.2011 16:13, schrieb Mike L.:

In the real world application - I tried to simplify it so as to
replicate/demonstrate that a problem exists - I implemented a Processor
because the message has several values set in Headers. I am aware of
Camel's excellent automatic conversion of the payload (as in your
example) but I am not aware of how to also declare and access any
  Header properties without access to the Exchange.

You can use annotations to get the headers but in the case using exchange may be a good thing.

The next thing is you do not need to use inOut jms and activemq components use 
InOut by default. To call the bean simply use:

<to uri="myBean"/>

and define the bean in spring:

<bean id="myBean" class="MyProcessor"/>
The client application runs on a separate machine from the server. Additionally, I do not 
want the client applications to have to "know" the bean that processes the 
requests; but rather only the endpoint name. I had hoped to be able to make synchronous 
calls over JMS because it somehow feels more loosely coupled (although, it could be 
argued that knowing the endpoint name still makes it point-to-point).

Forgive me if I misunderstood your point.
What I wanted to say is that you do not have to do anything special to make a synchronous call. If your client sends to the queue like you do with requestBody then it initiates a synchronous call. It sends to the specified queue and creates a temp queue for the reply which it gives the server using the replyTo header in jms. On the server side you do:

<from uri="jms:myQueue"/>
<to uri="myBean"/>

That is all you need to receive the jms message, process it in the bean and send the reply back.

Christian

--
----
http://www.liquid-reality.de

Reply via email to