how to get the resultset from a camel jpa component?
on querying a camle jpa component like
<from uri="jpa:jpa.camel?consumer.query=select x from jpa.camel x"/>
<to uri="bean:SomeBean?method=query" />
how do u get the list of records from camel exchange in the b开发者_开发知识库ean ? i have tried casting as List ,Resultset objects .but i get a ClassCastException .
You get one entity at a time. So if the query returns 5 rows, then 5 exchanges are created and published from the jpa consumer. So the bean will then be invoked 5 times, one for each exchange.
精彩评论