Lou,

You're right that the setter is missing from the code.  We do intend
to support people injecting their own LockManager implementation, so
we have to add a setter for it.  Could you raise a JIRA for adding it?

In the meanwhile, you can probably use lookup method DI as a
workaround.  Have a look at
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-lookup-method-injection
for some background, in your case the code will look something like
<lookup-method name="createLockManager" bean="myLockManager"/>

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/4/22 Lou Parisi <[email protected]>:
>
> I tried to create a custom LockManager for FTP Poller but I get an error:
>
> Initialization of bean failed; nested exception is
> org.springframework.beans.InvalidPropertyException: Invalid property
> 'lockManager' of bean class [org.apache.servicemix.ftp.FtpPollerEndpoint]:
> No property 'lockManager' found
>
> The same LockManager I created does work on the File Poller.  Looking at the
> FtpPollerEndpoint source code at:
>
> http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-ftp/trunk/src/main/java/org/apache/servicemix/ftp/FtpPollerEndpoint.java
>
> it seems that the LockManager is not a settable property for the FTP Poller.
> The documentation for FTP Poller at
> http://servicemix.apache.org/servicemix-ftp.html indicates that LockManager
> should be a settable property for FTP File Poller.  Am I doing something
> wrong?
>
>  <ftp:poller service="esb:ftpPoller"
>                endpoint="gateFilePoller"
>                targetService="esb:fileDetectedPipeline"
>                targetEndpoint="fileDetectedPipelineEndpoint"
>                uri="ftp://user:p...@host/path_to/file";
>                recursive="true"
>                deleteFile="false"
>                period="3000"
>                marshaler="#binaryMarshaler"
>                lockManager="#myLockManager"/>
>
>  <bean id="binaryMarshaler"
>        class="org.apache.servicemix.components.util.BinaryFileMarshaler">
>        <property name="contentType" value="application/octet-stream"/>
>  </bean>
>
>  <bean id="myLockManager"
> class="com.photomask.esb.components.util.BlobLockManager" />
>
> What is the recommended way to keep track of files that have been processed
> by the FTP Poller if you do not delete the files after processing?
> --
> View this message in context: 
> http://www.nabble.com/LockManager-for-FTP-Poller-tp23175832p23175832.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Reply via email to