-
1. Re: Getting connection from ibatis in Java DSL
davsclaus Aug 24, 2011 4:24 AM (in response to isakoves)Just use ibatis as the component name in your java dsl as shown here
http://camel.apache.org/ibatis
However that requires the sqlMapConfig.xml file to be in the root of the classpath for IBatisComponent to be able to load it.
If you have the file loacated elsewhere, you can set it on the IBatisComponent which you can configure in the camel xml file also
-
2. Re: Getting connection from ibatis in Java DSL
isakoves Aug 24, 2011 5:02 AM (in response to isakoves)Ibatis works in my project:
from("ibatis:GetUnprocessedUpdates?statementType=QueryForList&initialDelay=1000&delay=60000").to(...).process(new Processor()...)
But I need in Processor use connection from Ibatis to call stored procedure from database:
Connection conn = null;
CallableStatement cstmtRequest = null;
conn = ...;
-
3. Re: Getting connection from ibatis in Java DSL
davsclaus Aug 25, 2011 12:00 AM (in response to isakoves)You could possible get the iBatis SqlMapClient from the IBatisComponent and/or the endpoint. And I would assume that API may have a way of getting a connection / API to invoke a stored procedure.
-
4. Re: Getting connection from ibatis in Java DSL
isakoves Aug 31, 2011 4:47 AM (in response to isakoves)Thank you for reply