uday bhaskar wrote:
Mark :

There is one more option is availble in FIlePoller for this:
please check this.

<property name="deleteFile" value="true" />

I fell u missed this in configuration in servicemix.xml

Excellent suggestion. I did miss that.

With 2.x I didn't need to specify this as true, and with the 3.0-snapshot(may4) I didn't have to when using filepoller->trace.

I just tried setting this property in the FilePoller, but it still won't delete the files in the case: filePoller->TestComponent->Trace

However, it doesn't help. The logs show:

2006-05-11 10:43:50,627 DEBUG FilePoller - Processing file inbox/ScheduledBill.xml 2006-05-11 10:43:50,628 DEBUG DeliveryChannelImpl - Sending ID:localhost.localdomain-52951-1147358622733-5:3 in DeliveryChannel{filePoller}
2006-05-11 10:43:50,639 DEBUG DeliveryChannelImpl - Sent: MessageExchange[
  id: ID:localhost.localdomain-52951-1147358622733-5:3
  status: Active
  role: consumer
  service: {http://servicemix.apache.org/demo/}test
  in: <?xml version="1.0" ...


2006-05-11 10:43:50,640 DEBUG Broker - Routing exchange [EMAIL PROTECTED] to: ServiceEndpoint[service={http://servicemix.apache.org/demo/}test,endpoint=test]
2006-05-11 10:43:50,641 DEBUG AbstractFlow - Called Flow send
2006-05-11 10:43:50,642 DEBUG AbstractFlow - Called Flow doRouting
2006-05-11 10:43:50,661 DEBUG DeliveryChannelImpl - Sent: MessageExchange[
  id: ID:localhost.localdomain-52951-1147358622733-5:3
  status: Done
  role: provider
  service: {http://servicemix.apache.org/demo/}test
  endpoint: test
  in: <?xml version="1.0" encoding="UTF-8"?>...


... then repeat, where the FilePoller processes the same file and the status is Active. Something is broken in 3.0, or I'm not using the FilePoller correctly, or I haven't written my simple test correctly. Since my code works in 2.x I'm leaning towards something being broken in 3.0.

Any suggestions?

Thanks.




Cheers,
Uday Garikapati

On 5/11/06, Mark Swanson <[EMAIL PROTECTED]> wrote:

Guillaume Nodet wrote:
> The file is deleted when the ack has been received by the file poller.
> Check that the provider send the DONE status.
>
> Cheers,
> Guillaume Nodet
>
> On 5/4/06, Mark Swanson <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> The FilePoller no longer deletes the source file after it has been
>> processed. This used to work fine in 2.0.2. The logs show the
FilePoller
>> processed the file and sent it to the next ServiceEndpoint, yet the
file
>> is not deleted and the FilePoller sends it again and again.
>>
>> Any idea?

Ok, what works:
FilePoller -> Trace. The file is deleted and all works well.

What does not work:

FilePoller -> TestMessageExchangeListener -> Trace

The same code for TestMessageExchangeListener works fine in 2.x:

public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
     if (exchange.getStatus()!=ExchangeStatus.ACTIVE)
         return;

     done(exchange);
}

Relevant servicemix.xml:

     <sm:activationSpecs>

       <!-- Look for files in the inbox directory, send them to the
scheduler -->
       <sm:activationSpec
         componentName="filePoller"
         destinationService="my:test"
         service="my:filePoller">
         <sm:component>
           <bean xmlns="http://xbean.org/schemas/spring/1.0";
             class="org.apache.servicemix.components.file.FilePoller">
             <property name="workManager" ref="workManager" />
             <property name="file" value="inbox" />
             <property name="period" value="4000" />
             <property name="filter">
               <ref bean="xmlFileFilterID"/>
             </property>
           </bean>
         </sm:component>
       </sm:activationSpec>

       <!-- test -->
       <sm:activationSpec
         componentName="test"
         destinationService="my:trace"
         service="my:test">
         <sm:component>
           <bean xmlns="http://xbean.org/schemas/spring/1.0";
             class="TestMessageExchangeListener">
             <property name="factory">
               <ref bean="schedulerFactoryBean"/>
             </property>
           </bean>
         </sm:component>
       </sm:activationSpec>


Are there additional requirements in 3.0 to set the DONE status?

Thank you.

--
Free replacement for Exchange and Outlook (Contacts and Calendar)
http://www.ScheduleWorld.com/tg/
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb






--
Free replacement for Exchange and Outlook (Contacts and Calendar)
http://www.ScheduleWorld.com/tg/
WebDAV: http://www.ScheduleWorld.com/sw/webDAVDir/4000.ics
VFREEBUSY: http://www.ScheduleWorld.com/sw/freebusy/4000.ifb

Reply via email to