I am developing an application for monitoring a local folder, when a file
was changed or added this is transfered to another box via sftp or ftp

Monitoring routines of vfs works fine, ftp also, sftp while the other box is
alive has not problem, but if the other box is down when monitor trigger the
event after remote box is restablished all subsecuent transfers abort with
error.

If instead of sftp we did the same process with ftp, vfs restablish the
connection succesfuly


Any idea?


 
SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts,"no"
);
            SftpFileSystemConfigBuilder.getInstance().setTimeout(opts,1000);
            manager = VFS.getManager();

                quearchivo = fileobject.getURL().toString();

                fileobject = manager.resolveFile(fileobjectStringURL,opts);

                if (fileobject.exists()){  <--- Here throws error
                ...



...     
        Caused by: com.jcraft.jsch.JSchException: session is down
        at com.jcraft.jsch.Session.openChannel(Session.java:641)
        at
org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSyste
m.java:121)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to