On 03/01/2008, Patrick Shea <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to express using routes how to create multiple messages from 
> one endpoint.

FWIW the JPA endpoint does this...
http://activemq.apache.org/camel/jpa.html

e.g.

from("jpa:com.acme.MyFoo").to("activemq:MyQueue")

would send a message for each MyFoo entity in the database (deleting
them after the message has been sent).

If you would rather update the entity bean rather than delete it, you
can annotate a method with @Consumed and it'll call that to update
itself - then use the ?consumeDelete=false on the URI.


> I did use an internal template to sendBody() multiple time but what I am 
> trying to do is read a sql table, send a jms message for each row, wait for 
> acknowledment then update the record.

Are you using any of the existing endpoints or writing your own?

> I tried to use the CLIENT_ACKNOWLEDGE parameter on the endpoint but this does 
> not seem to work.

Acknowlegements are only really used for consuming JMS messages. Once
a send in JMS is completed its done.

You could look at using Spring declarative transactions when working
with JMS; then you can switch from pure JMS transactions to XA if ever
you need it etc.
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to