Return-Path: Delivered-To: apmail-activemq-camel-commits-archive@locus.apache.org Received: (qmail 87572 invoked from network); 31 Dec 2007 15:57:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Dec 2007 15:57:25 -0000 Received: (qmail 43800 invoked by uid 500); 31 Dec 2007 15:57:13 -0000 Delivered-To: apmail-activemq-camel-commits-archive@activemq.apache.org Received: (qmail 43776 invoked by uid 500); 31 Dec 2007 15:57:13 -0000 Mailing-List: contact camel-commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-commits@activemq.apache.org Received: (qmail 43767 invoked by uid 99); 31 Dec 2007 15:57:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2007 07:57:13 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2007 15:57:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CE7031A984E; Mon, 31 Dec 2007 07:57:01 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r607743 - /activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java Date: Mon, 31 Dec 2007 15:57:01 -0000 To: camel-commits@activemq.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071231155701.CE7031A984E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jstrachan Date: Mon Dec 31 07:57:00 2007 New Revision: 607743 URL: http://svn.apache.org/viewvc?rev=607743&view=rev Log: added a patch for https://issues.apache.org/activemq/browse/CAMEL-282 Modified: activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java Modified: activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java?rev=607743&r1=607742&r2=607743&view=diff ============================================================================== --- activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java (original) +++ activemq/camel/trunk/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisProducer.java Mon Dec 31 07:57:00 2007 @@ -17,8 +17,12 @@ */ package org.apache.camel.component.ibatis; +import java.util.Iterator; + import com.ibatis.sqlmap.client.SqlMapClient; import org.apache.camel.Exchange; +import org.apache.camel.util.ObjectHelper; +import org.apache.camel.converter.ObjectConverter; import org.apache.camel.impl.DefaultProducer; /** @@ -45,7 +49,12 @@ } else { String operation = getOperationName(exchange); - endpoint.getSqlClient().insert(operation, body); + + // lets handle arrays or collections of objects + Iterator iter = ObjectConverter.iterator(body); + while (iter.hasNext()) { + endpoint.getSqlClient().insert(operation, iter.next()); + } } }