Hm this is a little bit strange hier is my filter class:

public class XMLFilter implements FileFilter {
        
        public static String XML_FILEEXTENSION = ".xml";
        
        public boolean accept(File pathname) {
                System.out.println(pathname);
                String strFilename = pathname.getName();
                if (strFilename.endsWith(XML_FILEEXTENSION)) {
                        return true;
                }
                return false;
        }
}

So in my opinion this must be possible to filter the subfolders. But the
output shows me that Servicemix only tries to filter the pathes of the
subfolders not the files themself:
/home/smx/input/products/nl-NL
/home/smx/input/products/test

(the root folder is /home/smx/input/products) but all files in the
subfolders are ignored by the filter so it is always false for the
subfolders...

Regards
/Steffen


lhe77 wrote:
> 
> Ah, that is what I expected actually.
> Your filter should be changed so that folders and files with extension
> .xml are 
> allowed.
> 
> Lars
> 
> 
> Am Dienstag 23 September 2008 14:28:45 schrieb steff aka sid:
>> Ok, I found out, that in my case it belongs to the filter I've created.
>> So
>> I think I have to change my filter condition. Because the subfolders
>> don't
>> have an extension like *.xml so they are not polled. Hm its maybe a good
>> idea to change that behaviour? So that the condition is applied to the
>> subdirectories too not only on root folder?
>>
>> Regards
>> /Steff
>>
>> steff aka sid wrote:
>> > Hm,
>> > I've Ubuntu too, but its not working for me. Allrights are set correct.
>> I
>> > tried first:
>> > <file:poller service="brockhaus:inbox"
>> >                endpoint="endpoint"
>> >                targetService="brockhaus:transformer"
>> >
>> >
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
>> >erService/process" file="/home/smx/input/products/"
>> >                deleteFile="true"
>> >                recursive="true"
>> >                period="10000"
>> >                filter="#XMLFilter" />
>> > and second:
>> > <file:poller service="brockhaus:inbox"
>> >                endpoint="endpoint"
>> >                targetService="brockhaus:transformer"
>> >
>> >
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
>> >erService/process" file="file:///home/smx/input/products/"
>> >                deleteFile="true"
>> >                recursive="true"
>> >                period="10000"
>> >                filter="#XMLFilter" />
>> >
>> > I thought about the directory names but also a directory called 'test'
>> > was not polled.
>> >
>> > So is here someone how knows why that happens?
>> >
>> > Regards
>> > /Steff
>> >
>> > lhe77 wrote:
>> >> Hi,
>> >>
>> >> I use the file poller under Ubuntu Linux and it works fine.
>> >> This can have 2 reasons in my opinion:
>> >>
>> >> 1. the directory you specified in ${filepoller.path} is not a valid
>> one
>> >> As comparison, this is what I have here in my case:
>> >> <f:poller
>> >>       service="cp:filePoller"
>> >>       endpoint="pollerEndpoint"
>> >>       file="file:///home/lhe/smxtest/input/"
>> >>       targetService="cp:workflow"
>> >>       period="5000"
>> >>       recursive="true"
>> >>       autoCreateDirectory="true" />
>> >> Maybe these slashes in file attribute have something to do with it, I
>> >> don't know exactly.
>> >>
>> >> 2. Maybe you simply don't have the rights to poll these directory or
>> >> specific sub-directories
>> >>
>> >> Regards,
>> >> Lars
>> >>
>> >> Abdeslam El Abbassi wrote:
>> >>> Hi,
>> >>> in windows plate forme the recursive file polling work very well.
>> >>> but when we deploy in linux plate form, this don't work
>> >>>
>> >>> here my code :
>> >>>
>> >>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>> >>> recursive="true"
>> >>>                  file="file:${filepoller.path}" 
>> >>> targetService="ws_eai:jmsselect"
>> >>> targetEndpoint="jmsselect" period="1000">
>> >>>
>> >>> filepoller.path is path to directory as "/opt/dir"
>> >>>
>> >>> We use servicemix 3.2 version
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> http://www.brockhaus-group.com www.brockhaus-group.com
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: 
http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626780.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to