-
Mar 23rd, 2011, 07:23 AM
#1
FTP not using port number
Hello,
I think I've found a bug. I've been trying to use the ftpClientFactory:
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session .DefaultFtpSessionFactory">
<property name="host" value="localhost"/>
<property name="port" value="40000"/>
<property name="username" value="test"/>
<property name="password" value="test123"/>
<property name="clientMode" value="2"/>
<property name="fileType" value="2"/>
<property name="bufferSize" value="100000"/>
</bean>
but it doenst seem to use the port number (it still tries to connect to port 21).
I've looked at the source code:
http://git.springsource.org/spring-i...y.java#line148
I see that it only connects to the hostname, not the port. So, i've made a copy of that code and created my own class where I only changed that line to:
client.connect(host, port);
It now connects to the desired port specified in the applicationContext.
Best Regards,
Mathias Wiberg
-
Mar 23rd, 2011, 09:04 AM
#2
Mathias
Yes, this is a bug and it was already reported https://jira.springsource.org/browse/INT-1836
I should fix it today
Thanks for pointing this out
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules