On 04/02/2008, Sigmund <[EMAIL PROTECTED]> wrote:
>
> I can manage with synchronous, but how do I set the response to be sent back?
So the ProducerTemplate is the client side; it sends the request and
receives the response.
Its the server side which takes the request object and sets the
response. To implement the server side in Camel you'd use a route.
from("jms:someQueue").process(new Processor() {
public void process(Exchange exchange) {
Message out = exchange.getOut(true);
out.setBody(someResponseObject);
}
};
or even easier is to use a Java bean method...
public class Foo {
@MessageDriven(uri="jms:someQueue")
public String getResponse(String request) {...}
}
See
http://activemq.apache.org/camel/bean-integration.html
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com