Positive preliminary response from server when using FTPSender to send multiple
files
-------------------------------------------------------------------------------------
Key: SM-775
URL: https://issues.apache.org/activemq/browse/SM-775
Project: ServiceMix
Issue Type: Bug
Components: servicemix-ftp
Affects Versions: 3.0
Environment: Windows XP Professional
Reporter: Krzysztof Adamski
Fix For: incubation
I was trying to have scenario of polling directory for files and sending this
files to FTP server using FTPSender. However, subsequent files are not being
sent. First file is send then next one is created with zero size.
When debugging FTPSender I saw that OutputStream is null for subsequent
message. That's because FTPClient doesn't create socket. FTPClient checks if
there is positive preliminary response from server (number between 100 -> 199).
If there is - it's returning null value.
API for FTPClient is suggesting to invoke completePendingCommand() after output
stream is closed
(http://jakarta.apache.org/commons/net/api/org/apache/commons/net/ftp/FTPClient.html#completePendingCommand()).
After I invoke that - servicemix started to work.
[FTPSender.process(MessageExchange exchange, NormalizedMessage message)]
[...]
finally {
returnClient(client);
if (out != null) {
try {
out.close();
}
catch (IOException e) {
e.printStackTrace();
}
[...]
}
client.completePendingCommand();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira