Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 48999 invoked from network); 26 Sep 2010 11:30:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Sep 2010 11:30:53 -0000 Received: (qmail 90834 invoked by uid 500); 26 Sep 2010 11:30:53 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 90620 invoked by uid 500); 26 Sep 2010 11:30:51 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 90612 invoked by uid 99); 26 Sep 2010 11:30:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 11:30:50 +0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qw0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 11:30:46 +0000 Received: by qwk4 with SMTP id 4so914388qwk.32 for ; Sun, 26 Sep 2010 04:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=YVTyQOQYbUVVQhkmyEEOhrCV1cPPST1oZYsws+1adQo=; b=gdNgXhNw4pbBCD15yjvQ1FovuAFfCWhaMm3usIGyw553h3PnWKLIQkcmk/rFf/16Ua Ab61eF48t3nwXoA0Z6jzCeuGFuVA+iJSeKggZ4cSDhkrc5bv8c9mdTcWsYsBx+0QZR9r 0jyAKF1VZOsFCddH3vtQI65FTMXNJnyQWw5ww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=ieuj1CQ6dMs5dQDjjGP+4YQZGaLqfnOw1b6c0lxxkskHPcyDUBuo9WuOjYBpt8qu7T xQtoKwj1GZJHJHAIfKGb5jE9K89rOn03oXojBmFx/x9xYKR/cuoPh8jbUUbLf16fu02a p62N9Vc/zxIA6tjXDldnZs5kNyPHAnfuGePXw= Received: by 10.229.219.80 with SMTP id ht16mr1474089qcb.53.1285500625143; Sun, 26 Sep 2010 04:30:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.11.22 with HTTP; Sun, 26 Sep 2010 04:30:04 -0700 (PDT) In-Reply-To: <1285500270893-2854276.post@n5.nabble.com> References: <1285500270893-2854276.post@n5.nabble.com> From: Claus Ibsen Date: Sun, 26 Sep 2010 13:30:04 +0200 Message-ID: Subject: Re: Transacted route with swing client To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 http://fusesource.com/fuse/apache-books/ But that is not the complete chapter, which you can buy from Manning http://www.manning.com/ibsen/ There is also some docu at the camel website http://camel.apache.org/transactional-client.html 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 imag= e > associated with it. > The imageProcessor bean is a swing application. Where the user will modif= y > the object and finally accept/reject the image. After which the contest > object will be saved to the database. > > Summary: > =A01. get contest object / image from queue > =A02. Display image to user via a swing gui > =A03. User accepts/rejects image > =A04. save to database > > > from("activemq:queue:contest").transacted().to("bean:imageProcessor?metho= d=3Dprocess") > > The imageProcessor bean will display the image to the user via a swing gu= i > and after a 1-2mins will make a decision on accepting it or not. This act= ion > will be done via a buttonListener. > If I understand correctly the displaying of the image (process method) wo= uld > 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: http://camel.465427.n5.nabble.com/Transacte= d-route-with-swing-client-tp2854276p2854276.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus