On Thu, Dec 17, 2009 at 4:59 PM, Claus Ibsen <[email protected]> wrote: > On Thu, Dec 17, 2009 at 4:55 PM, Aleksey Masny <[email protected]> wrote: >> >> Statement from any <sqlMap> in the same SqlMapConfig.xml will execute in same >> database, yes? >> But i'd like execute statment in another database. In one DB - pooling, then >> insert to another DB. >> > > Ah then define 2 ibatis components them > > <bean id="ibatis1" class="org.apache.camel.component.ibatis.IbatisComponent"> > <property name="sqlMapClient" ref="client1"/> > </bean> > > <bean id="ibatis2" class="org.apache.camel.component.ibatis.IbatisComponent"> > <property name="sqlMapClient" ref="client2"/> > </bean> >
Sorry it appears that in Camel 2.1 or older you need a bit more leg work to configure to use 2 different components with different SqlMapConfigt.xml files. I have changed that in 2.2 so you can set the name of this file directly. <property name="sqlMapConfig" value="classpath:MySecondSqlMapConfig.xml"/> > > And then use ibatis1 and ibatis2 in the camel urls. > > > >> >> -- >> View this message in context: >> http://old.nabble.com/How-to-use-multiple-dataSource-in-camel.iBatis--tp26828799p26830215.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
