-
Enhancement
-
Resolution: Done
-
Major
-
jboss-fuse-6.2.1
-
%
-
-
6.3 Sprint 4 (Mar 28 - Apr 29)
camel-sql component sql select query is not working when we pass object array dynamically:
Please find below class which populates value in map
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public class NewTopicBean {
Integer topics[] =
{1,2,3};
public Map<String, Object[]> generateNewTopic()
{ Map<String, Object[]> answer = new HashMap<String, Object[]>(); answer.put("TopicId", topics); return answer; }~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please find blueprint configuration:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<bean id="topicBean" class="com.route1.NewTopicBean" />
<route id="routeMysql1">
<from uri="direct:selectMysql1" />
<transform>
<method ref="topicBean" method="generateNewTopic" />
</transform>
<to
uri="sql:select * from FLIGHTS where number in (:#TopicId)?dataSource=mysql1XADataSource&allowNamedParameters=true" />
<log message="Got ${body}"/>
<to uri="mock:routeMysql1"/>
</route>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~