I've created a FTP poller using the components and lightweight container.
Here is the important config:

<bean class="org.apache.servicemix.components.net.FTPPoller">
<property name="marshaler">
<bean class="org.apache.servicemix.components.util.DefaultFileMarshaler"/> 
</property>
<property name="clientPool" ref="ftpClientPool" />
<!-- don't spec will use one automatically -->
<!-- property name="workManager" ref="workManager" /> -->
<property name="path" value="foo" />
<property name="period" value="1000" />
</bean>

<bean id="ftpClientPool"
class="org.apache.servicemix.components.net.FTPClientPool">
<property name="host" value="bsddev" />
<property name="username" value="rottaway" />
<property name="password" value="Cm0nkeyz" />
</bean>

Another thing is that after 5 or so minutes I get the following, repeatedly:

java.net.BindException: Can't assign requested address
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at
org.apache.commons.net.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:155)
        at
org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:475)
        at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2390)
        at
org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2364)
        at
org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)
        at
org.apache.servicemix.components.net.FTPPoller.poll(FTPPoller.java:61)
        at
org.apache.servicemix.components.util.PollingComponentSupport.run(PollingComponentSupport.java:62)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:613)
-- 
View this message in context: 
http://www.nabble.com/Unable-to-use-FTP-Poller-tf2411995.html#a6723454
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to