camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Transacted route with swing client
Date Sun, 26 Sep 2010 11:30:04 GMT
Just save the image to the database from your bean if the user accepts it.

For that you can use Spring's JdbcTemplate and have it work in the
transaction as well.
Since you use JMS + JDBC together you may want to use XA for that.

Camel in Action chapter 9 tells you how to do that and has examples as well.

There is an excerpt of chapter 9 for free here

But that is not the complete chapter, which you can buy from Manning

There is also some docu at the camel website

On Sun, Sep 26, 2010 at 1:24 PM, watcher <> wrote:
> I'm having difficultly in visualing this task. Here is what I'm trying to do.
> I have a contest object that is put onto a queue, this object has an image
> associated with it.
> The imageProcessor bean is a swing application. Where the user will modify
> the object and finally accept/reject the image. After which the contest
> object will be saved to the database.
> Summary:
>  1. get contest object / image from queue
>  2. Display image to user via a swing gui
>  3. User accepts/rejects image
>  4. save to database
> from("activemq:queue:contest").transacted().to("bean:imageProcessor?method=process")
> The imageProcessor bean will display the image to the user via a swing gui
> and after a 1-2mins will make a decision on accepting it or not. This action
> will be done via a buttonListener.
> If I understand correctly the displaying of the image (process method) would
> have send a reply to the queue and the transaction would be complete.
> How can I extend the tranaction in this case to include.
> 1. accepting/rejecting image
> 2. saving to database.
> Hope thats clear.
> Thanks
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message