You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by piyushbhatt <bh...@gmail.com> on 2014/03/28 09:07:05 UTC
Access FileIdempotentRepository in Custom File Process Strategy
Hi,
We have implemented a custom file process strategy using a file store based
idempotent repository which is configured in the xml
Lets say we have 2 types of files A and B where B has to be transferred
after A. So the logic for transferring B is as below
Class CustomProcessStrategy extends GenericFileProcessStrategySupport<T>
{
public boolean begin(GenericFileOperations<T> operations,
GenericFileEndpoint<T> endpoint, Exchange exchange, GenericFile<T> file)
{
If (file.getFileName()==A)
return accept=true;
else If (file.getFileName==B &
endpoint.getIdempotentRepository().contains(A))
return true;
else return false;
}
The file A is getting transferred though B never gets transferred since the
method endpoint.getIdempotentRepository().contains(A) always returns false
though the file A is stored in the file store idempotent repository when we
look at it.
Am I missing something in the begin method ?
Regards
Piyush
--
View this message in context: http://camel.465427.n5.nabble.com/Access-FileIdempotentRepository-in-Custom-File-Process-Strategy-tp5749472.html
Sent from the Camel - Users mailing list archive at Nabble.com.