I use Camel and iBatis component. And i need pool data in one database,
transform it and insert to another database.
Therefore I have two different SqlMapConfig*.xml files (SqlMapConfigWMS.xml
and SqlMapConfigJDE.xml) in src/resources directory. SqlMapConfigWMS.xml
includes link to WMS_selectMissingBoms statement and SqlMapConfigJDE.xml
includes link to JDE_testInsert statement.
My route:
from("ibatis:WMS_selectMissingBoms?" +
"maxMessagesPerPoll=1&" +
"initialDelay=1000&" +
"delay=60000").//pool in one database
to("bean:helper?method=mapBomToEvent").//transform
to("ibatis:JDE_testInsert?statementType=Insert")//insert to
another
database
But iBatis component uses only one, first found or default SqlMapConfig.xml.
Therefore camel-ibatis throw exception
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
JDE_testInsert in this SqlMap.
I think, for resolve this problem I can use two ibatis istanсes and
configure its with different SqlMapConfig*.xml files? For example
"ibatis_WMS" and "ibatis_JDE", and use this id in endpoint url? But how
manualy create instance ibatis component with predefined configuration file?
Or do you know of any other solution?
Thank you and best regards,
Aleksey Masny.
--
View this message in context:
http://old.nabble.com/How-to-use-multiple-dataSource-in-camel.iBatis--tp26828799p26828799.html
Sent from the Camel - Users mailing list archive at Nabble.com.