I'm trying to register a jdbc connection.
The camel docs say to do:

JndiRegistry reg =super.createRegistry();
reg.bind("testdb", ds);
return  reg;

What's the super object referring to?

I'm trying to do:
    val dataSource = new MysqlConnectionPoolDataSource()
    dataSource.setUser("root")
    dataSource.setServerName("localhost")
    dataSource.setPort(3306)
    dataSource.setDatabaseName("test")
    val context = new DefaultCamelContext
    val reg = new JndiRegistry(context)
    reg.bind("test", dataSource)

but I'm running into this error:
InvocationTargetException: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

Isn't the initial context the defaultCamelContext?

--
@tommychheng
http://tommy.chheng.com

Reply via email to