Passing a data source as a JNDI name - Cloud - 8.0

Talend ESB Container Administration Guide

Version
Cloud
8.0
Language
English
Product
Talend Cloud
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Administration and Monitoring
Design and Development
Installation and Upgrade

To use an JNDI name, the prefix jndi: needs to be provided. The example below assumes the use of Aries JNDI to expose services via JNDI.

<jaas:config name="karaf">
   <jaas:module 
      className="org.apache.karaf.jaas.modules.jdbc.JDBCLoginModule" 
      flags="required">
      datasource = jndi:aries:services/javax.sql.DataSource/   \\
         (osgi.jndi.service.name=jdbc/karafdb)
         query.password = SELECT PASSWORD FROM USERS WHERE USERNAME=?
         query.role = SELECT ROLE FROM ROLES WHERE USERNAME=?
   </jaas:module>
</jaas:config>