Hi Mr claus you could just bind the datasource to the default camel runner if
you are not using any containers to run your route as shown below.
package com.notifications;
import org.apache.camel.main.Main;
/**
* A drops notifications .
*/
public class StartupManager {
/**
* A main() so we can easily run these routing rules in our IDE
*/
public static void main(String... args) throws Exception {
Main main = new Main();
main.enableHangupSupport();
DriverManagerDataSource ds = new DriverManagerDataSource();
ds.setDriverClassName("com.mysql.jdbc.Driver");
ds.setUrl("jdbc:mysql://localhost:3306/examen");
ds.setUsername("root");
ds.setPassword("");
main.bind("datasource", ds);
//Configure routes for operations.
....
//Then start the routes...
main.run(args);
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/how-to-do-a-registry-of-type-javax-sql-DataSource-tp5729644p5729730.html
Sent from the Camel - Users mailing list archive at Nabble.com.