How can a tFTPConnection be closed?

Question

How can a tFTPConnection be closed?

 

Answer

Prior to version 6.3.1, there was no feature that would close an FTP connection. This component was added, and is available from version 6.3.1 and higher.

 

Talend 6.3.1 and higher

For details about the tFTPClose component, see tFTPClose in the Talend Components Reference Guide in the Talend Help Center.

 

Prior to Talend 6.3.1

For versions prior to 6.3.1, use a tJava component and implement both exit the channel and disconnect the session commands, as shown below:

com.jcraft.jsch.ChannelSftp chnSftp = (com.jcraft.jsch.ChannelSftp) globalMap.get("conn_tFTPConnection_1");
System.out.println ("DROPPING CONNECTION");
com.jcraft.jsch.Session ssn = chnSftp.getSession();
chnSftp.disconnect();
ssn.disconnect();

 

There is also a community component called tFTPClose - 2.0.

Version history
Revision #:
4 of 4
Last update:
‎12-08-2017 05:25 PM
Updated by:
 
Contributors