Hi All,
I am trying to use a SQL Server database in a camel route using jdbc
endpoint as follows:
from("timer://foo?period=60000").setBody(constant("select * from
customer")).to("jdbc:microsoft:sqlserver://SOBSQL01;DatabaseName=MyDatabase")
.to("file://data/inbox?fileName=t.txt");
However, I get an exception saying that
Failed to resolve endpoint:
jdbc://microsoft:sqlserver://SOBSQL01;DatabaseName=SecondLife due to: No
bean could be found in the registry for:
microsoft:sqlserver://SOBSQL01;DatabaseName=MyDatabase
of type: javax.sql.DataSource
How can I register my database WITHOUT using spring?
jdbc component documentation says that I should do the following:
JndiRegistry reg = super.createRegistry();
reg.bind("testdb", db);
return reg;
However, I am not using camel test class. And what should be assigned to the
variable db?
Even a pointer to a documentation is much appreciated.
/Sura
--
View this message in context:
http://camel.465427.n5.nabble.com/how-to-use-a-jdbc-endpoint-tp5720330.html
Sent from the Camel - Users mailing list archive at Nabble.com.