I think Dmhatre was asking for a "batch insert" option...
As you can see in [1], you can provide an array or collection as body and
the camel-jpa component will iterate over all entries and save them.

[1]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java

Best,
Christian

On Wed, May 16, 2012 at 3:49 AM, Willem Jiang <willem.ji...@gmail.com>wrote:

> You may consider to use splitter[1] to pass the EntityTest object to the
> jpa endpoint.
> [1]http://camel.apache.org/**splitter.html<http://camel.apache.org/splitter.html>
>
>
> On Wed May 16 07:31:03 2012, dmhatre wrote:
>
>> Hi Folks,
>>    Below is the sample route. I am returning ArrayList<EntityTest>  from
>> processor (can say setting exchange body). Is it possible to insert the
>> list
>> in database instead for inserting it one by one?
>> Kindly help me with this.
>> Thanks in advance.
>>
>>
>> <route>
>>      <from uri="file:D://cameldata/test"/**>
>>      <process ref="jpaProcessor"/>
>>      <to uri="jpa:org.apache.camel.**example.spring.EntityTest"/>
>>
>> </route>
>>
>> Caused by: No type converter available to convert from type:
>> java.util.ArrayList to the required type:
>> org.apache.camel.example.**spring.EntityTest
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.**
>> com/Help-with-bulk-insert-**using-Spring-JPA-hibernate-**tp5710457.html<http://camel.465427.n5.nabble.com/Help-with-bulk-insert-using-Spring-JPA-hibernate-tp5710457.html>
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Willem
> ------------------------------**----
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Web: http://www.fusesource.com
> Blog:    
> http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>        http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>
>

Reply via email to