admin管理员组文章数量:1122832
so first I'm new to Talend ESB, Camel and Karaf and I'm facing an issue when I try to get a datasource (that has been created on a Karaf instance).
Here is the DataSources GBMREFPPR, is the one I'm trying to use.
I'm trying to get the connection using a java Bean like this :
try {
DataSource source = (DataSource) camelcontext.getRegistry().lookupByName("GBMREFPPR");
con = source.getConnection();
} catch (Exception e) {
System.out.println(e);
}
And when the route starts I get a java NullPointerException.
So is what I am trying to do is possible, and if so what am I doing wrong ?
Thanks.
本文标签: javaTalend ESBKarafGet datasource from CamelContextregistryStack Overflow
版权声明:本文标题:java - Talend ESBKaraf : Get datasource from CamelContextregistry - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736309220a1933938.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论