talend - Use an existing database connexion in a tJava component -


i'm looking way call existing database connxion in tjava component. have created new bdd connexion in java bloc , new connexion not permit me use data insert tmysqlconnexion component because first connexion commit @ end of job. need use in java bloc same connexion using in tmysqlconnexion.

thank you !

the tmysqlconnection component stores connection in job's globalmap. can retrieve there , use in tjava component, so:

java.sql.connection c = (java.sql.connection)globalmap.get("conn_tmysqlconnection_1"); 

this assumes tmysqlconnection has unique name tmysqlconnection_1; change actual name used in job.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -