Hi,

You can register a instance of your AppFileChangedExclusiveReadLockStrategy into Camel registry with the name myReadLockStrategy.

If you are using Spring , you just need to add below define
<bean id=myReadLockStrategy class="my.package.definition.AppFileChangedExclusiveReadLockStrategy"

then you can define your endpoint like this
file:///mnt/new?autoCreate=false&delete=true&exclusiveReadLockStrategy=#myReadLockStrategy&maxMessagesPerPoll=1&readLock=changed&recursive=true

Camel will look up the name which start with # from its registry.

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang




rsvalerio wrote:
Camel 2.2.0.

Property value:
exclusiveReadLockStrategy=my.package.definition.AppFileChangedExclusiveReadLockStrategy

This class extends FileChangedExclusiveReadLockStrategy,
Get the erro, when start camel:
-------------------
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
file:///mnt/new?autoCreate=false&delete=true&exclusiveReadLockStrategy=my.package.definition.AppFileChangedExclusiveReadLockStrategy&maxMessagesPerPoll=1&readLock=changed&recursive=true
due to: Could not find a suitable setter for property:
exclusiveReadLockStrategy as there isn't a setter method with same type:
java.lang.String nor type conversion possible: No type converter available
to convert from type: java.lang.String to the required type:
org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy with
value my.package.definition.AppFileChangedExclusiveReadLockStrategy
-------------------


I try to define a field exclusiveReadLockStrategy of type
AppFileChangedExclusiveReadLockStrategy in my route class (RouteBuilder son)
but the erro persist.

Thanks in advance.

Rodrigo Valerio.

Reply via email to