This content has been marked as final.
Show 2 replies
-
1. Re: net.sourceforge.jtds.jdbc.Driver Sample with connection pooling (ESB 4.2)
gertv Mar 1, 2010 9:37 AM (in response to thygesen)L.S.,
The jTDS project provider its own DataSource implementation called net.sourceforge.jtds.jdbcx.JtdsDataSource. You can install jTDS in Karaf/ServiceMix using osgi:install -s wrap:mvn:net.sourceforge.jtds/jtds/1.2.4
Once you've done that, you should be able to use it in a Camel route with:
<beans> <camelContext> // your camel routes go here, using // jdbc:mssql to address MS SQL Server // (as explained in http://camel.apache.org/jdbc.html) </camelContext> <!-- bean called mssql to match the data source name in the camel uri --> <bean id="mssql" class="net.sourceforge.jtds.jdbcx.JtdsDataSource"> <property name="user">MYUSER</property> <property name="password">SECRET</property> <property name="serverName">MYSQLSERVER</property> <!-- other settings found on http://jtds.sourceforge.net/doc/net/sourceforge/jtds/jdbcx/JtdsDataSource.html --> </bean> </beans>
If you want, you can also inject the mssql bean into another bean and use that inside your Camel route.
Regards,
Gert
-
2. Re: net.sourceforge.jtds.jdbc.Driver Sample with connection pooling (ESB 4.2)
thygesen Mar 4, 2010 3:19 PM (in response to gertv)Cool it works. But how do I know its using connection pooling.
To me the source code looks like is calling getConnection() and not getPooledConnection()
but I'm no jtds, camel, jdbc or even java ace.
/peter