tags:

views:

114

answers:

0

Hi, I am using jcraft's jsch library to connect to SFTP server. for local testing im using core FTP mini sftp server.

I have quartz job which runs on my jetty server. This job picks up files from SFTP server and saves it to database. This is working fine, however when i use the disconnect api, the connection still exists. These connections are released only when i stop the jetty server.

finally {
 // Disconnect from SFTP server
 if (sftp != null) {
 try {
       sftp.quit();
 } catch (Exception e) {
  logger.error("Unable to disconnect from FTP server. " + e.toString());
 }
}

When i use the standalone java program it is disconnecting fine but when i connect through job on jetty server, this is happening.

Any suggestions would help me.

Thanks.