[ https://issues.apache.org/activemq/browse/SM-775?page=all ]
Guillaume Nodet resolved SM-775. -------------------------------- Fix Version/s: 3.1 (was: incubation) Resolution: Fixed Assignee: Guillaume Nodet Author: gnodet Date: Wed Dec 13 08:31:31 2006 New Revision: 486715 URL: http://svn.apache.org/viewvc?view=rev&rev=486715 Log: SM-775: Positive preliminary response from server when using FTPSender to send multiple files Modified: incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPPoller.java incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/net/FTPSender.java Author: gnodet Date: Wed Dec 13 08:31:35 2006 New Revision: 486716 URL: http://svn.apache.org/viewvc?view=rev&rev=486716 Log: SM-775: Positive preliminary response from server when using FTPSender to send multiple files Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpEndpoint.java incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/main/java/org/apache/servicemix/ftp/FtpPollingEndpoint.java incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/java/org/apache/servicemix/ftp/PollDirectoryTest.java incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-ftp/src/test/java/org/apache/servicemix/ftp/SpringComponentTest.java > 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 > Assigned To: Guillaume Nodet > Fix For: 3.1 > > Original Estimate: 30 minutes > Remaining Estimate: 30 minutes > > 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