Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] DB Connection close

hello all,
Im using talend Version 5.2.2. In jobs im using tMysqlConnection Component. I read in manual to close connection we have to use tMysqlClose Component.

So my doudt is :
1) how i will get to know connection is closed?? how can i check that connection is closed or not.
2) in job i used follwing flow to close the connection.
tpostjob--OnComponent ok --- > tMysqlClose. so is this proper way to close connection ??
Please suggest Answer for these two questions.
Thanks and Regards,
Akshath Hegde
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Yes,
You can use tpostJob--tMysqlClose to make sure the DB connection is always closed at the end of job, but note that the DB connection has not been closed yet on other component such as tMysqlCommit, tMySQLRollback, otherwise, you will get NPE error.
Shong

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Do you use a tMysqlConnection in the job to create the DB connection or create the DB connection on input/output component such as tMysqlInput? If the former, you have to use a tMysqlClose to close the DB connection at the end of job, if the later, the DB connection is closed on the input/output component.
Shong
Anonymous
Not applicable
Author

hi shong,
Thank you for response. Im using tmysqlConnection component for connection.
Can i close connection like this " tpostjob ---> tmysqlclose" ?? if i use tpostJob, whether it will be a problem??
Regards,
Akshath
Anonymous
Not applicable
Author

Yes,
You can use tpostJob--tMysqlClose to make sure the DB connection is always closed at the end of job, but note that the DB connection has not been closed yet on other component such as tMysqlCommit, tMySQLRollback, otherwise, you will get NPE error.
Shong