Hello,


I have got a problem developing a FTP server with the Apache Mina Ftp
Server API.



I need my server to be able to shut down immediately a transferring
session. I am trying to do this using the FtpIoSession.close(true) method.
What I do not understand is that it is working when I am connecting a
client via FileZilla and uploading a file, but if I use my own FTP client
(based on this tutorial : http://www.codejava.net/java-
se/networking/ftp/java-ftp-file-upload-tutorial-and-example ), the session
only closes after the transfer has finished.



After having a closer look via the eclipse debugger, it appears the workers
in org.apache.mina.filter.executor.OrderedThreadPoolExecutor do run the
“session closed” task only when the transfer has finished (for the second
case).



I tried this fonctionnality with a simple FTPServer for which I replace the
STOR instance by my own CustomSTOR extending STOR and starting a timer task
before calling the STOR execute method. The timer task uses
session.close(true) after a short time.



I could not see if FileZilla is transmitting a special session
configuration that changes the session behavior on server side… The logged
commands used by FileZilla  and my own FTP client are the same, as the
server responses for both the cases.



If there is something I have missed, or misunderstood, I would be happy to
use your help.



Best Regards,

Robin VERMES

Reply via email to