No I`m using java dsl.

I don`t know what`s the trick.

camelContext.getRegistry()

don`t have a method to use to set class in registry

Thanks


On Sun, Jul 4, 2010 at 11:07 PM, Willem.Jiang [via Camel]
<[email protected]> wrote:
> 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.
>
>
> ________________________________
> View message @
> http://camel.465427.n5.nabble.com/How-to-Use-exclusiveReadLockStrategy-property-in-file-component-tp604330p659450.html
> To unsubscribe from How to Use exclusiveReadLockStrategy property in file
> component?, click here.
>

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-Use-exclusiveReadLockStrategy-property-in-file-component-tp604330p660716.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to