Thanks Willem, I've got it working. It was more about classloading issues when I was using the dbcp with camel.
It turns out that I had most of the configuration right, but had to modify the dbcp jar to allow it to load the jdbc driver. Russ On Thu, Jan 15, 2009 at 1:41 AM, Willem Jiang <[email protected]>wrote: > Hi, > > I think you just need create a data source bean in spring with the name > of testdb, and let the camel context start with it. > > Willem > > Russ Chan wrote: > > Greetings, > > > > I'm trying to determine the best way to do adhoc queries to a number of > > databases, and then get the results into an NMR flow. > > > > Based on what I've read, the JDBC component of camel will do most of what > > I'm looking for, however, I can't seem to determine how to get the > bundles > > setup and installed correctly to achieve a working configuration. This > > seems to be quite easy to do in SMX3, as one can define the datasources > as > > defined in http://fusesource.com/docs/esb/3.4/deploy_guide/index.html - > > chapter 10. > > > > I've osgified my jdbc driver (jtds) and it's successfully loaded. > > > > At this point, I'm stuck on the first step - just querying a database > within > > a camel route... > > > > The camel documentation for the jdbc component indicates that the > datasource > > should be registered in jndi, and the camel registry - can this be done > via > > spring xml or should it be done programmatically? If programmatically - > > where is the best place to do this? > > > > > > Here's a sample camel route that I'd like to emulate: > > > > from("timer://foo?period=60000").setBody(constant("select * from > > customer")).to("jdbc:testdb").to("activemq:queue:customers"); > > > > > > How do I set up testdb? > > > > Any pointers to a tutorial (or working code) doing a simple query with a > > camel flow in SMX4 with osgi tooling would be very much appreciated! > > > > Russ > > > >
