http://comments.gmane.org/gmane.comp.jakarta.commons.issues/10495
https://issues.apache.org/jira/browse/NET-327
Recently, the camel-ftp component was enhanced (on my request) with the possibility to use a secure data channel. This is accomplished by using the execProt() (and execPsbz()) method in class FTPSClient.
However, later on (in case Camel needs to reconnect), one of the connect() methods in the base class to FTPSClient is called. Unfortunately all the connect methods first create an unconnected socket and then tries to connect it. The connection factory now associated with the FTPSClient then throws an exception stating: "Unconnected sockets not implemented".
It seems like the FTPSClient does not support "re-connect" once it has entered secure communications mode.
See also: http://www.mail-archive.com/[email protected]/msg04933.html
and http://www.mail-archive.com/[email protected]/msg08732.html
A code sample would be nice. But I've managed to do my own: executing the sequence "connect, execPROT(P), login, disconnect" twice on the same client instance causes the error. My patch fixes this issue - it overrides the disconnect() method of FTPClient in FTPSClient to re-set the SocketFactories (null is allowed, because the SocketClient knows how to deal with it). Thanks goes to Bengt Rodehav (http://www.mail-archive.com/[email protected]/msg04935.html) for pointing this out.
====
https://cn.forums.oracle.com/forums/thread.jspa?threadID=1531682