You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Mark Swanson <ma...@ScheduleWorld.com> on 2006/05/04 20:02:39 UTC

FilePoller no longer deletes

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?

2006-05-04 13:58:28,737 DEBUG AbstractFlow - Called Flow doRouting
2006-05-04 13:58:30,653 DEBUG FilePoller - Polling directory inbox
2006-05-04 13:58:30,654 DEBUG FilePoller - Scheduling file 
inbox/ScheduledBill.xml for processing
2006-05-04 13:58:30,655 DEBUG FilePoller - Processing file 
inbox/ScheduledBill.xml
2006-05-04 13:58:30,656 DEBUG DeliveryChannelImpl - Sending 
ID:localhost.localdomain-44411-1146763105364-5:1192 in 
DeliveryChannel{filePoller}
2006-05-04 13:58:30,663 DEBUG DeliveryChannelImpl - Sent: MessageExchange[
   id: ID:localhost.localdomain-44411-1146763105364-5:1192
   status: Active
   role: consumer
   service: {http://servicemix.apache.org/demo/}billScheduler
   in: <?xml version="1.0" encoding="UTF-8"?><opbill:tes
<test...
]
2006-05-04 13:58:30,664 DEBUG Broker - Routing exchange 
org.apache.servicemix.jbi.messaging.InOnlyImpl@324ff to: 
ServiceEndpoint[service={http://servicemix.apache.org/demo/}billScheduler,endpoint=billScheduler]
2006-05-04 13:58:30,665 DEBUG AbstractFlow - Called Flow send
2006-05-04 13:58:30,666 DEBUG AbstractFlow - Called Flow doRouting


-- 
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

Re: FilePoller no longer deletes

Posted by Mark Swanson <ma...@ScheduleWorld.com>.
Guillaume Nodet wrote:
> Could you raise a jira and attach the servicemix.xml file plus any
> other needed files (TestMessageExchangeListener.java, etc...).

After working with it some more I found the problem. I seem to 
misunderstand how to control the flow. I will post about it in a 
different thread.

Cheers.

-- 
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

Re: FilePoller no longer deletes

Posted by Guillaume Nodet <gn...@gmail.com>.
Could you raise a jira and attach the servicemix.xml file plus any
other needed files (TestMessageExchangeListener.java, etc...).

Cheers,
Guillaume Nodet


On 5/11/06, Mark Swanson <ma...@scheduleworld.com> wrote:
> 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
> org.apache.servicemix.jbi.messaging.InOnlyImpl@baa31b 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 <ma...@scheduleworld.com> 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 <ma...@scheduleworld.com> 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
>

Re: FilePoller no longer deletes

Posted by Mark Swanson <ma...@ScheduleWorld.com>.
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 
org.apache.servicemix.jbi.messaging.InOnlyImpl@baa31b 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 <ma...@scheduleworld.com> 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 <ma...@scheduleworld.com> 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

Re: FilePoller no longer deletes

Posted by uday bhaskar <ud...@gmail.com>.
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

Cheers,
Uday Garikapati

On 5/11/06, Mark Swanson <ma...@scheduleworld.com> 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 <ma...@scheduleworld.com> 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
>



-- 
Thanks,
Udaya Bhaskar Garikapati

Re: FilePoller no longer deletes

Posted by Mark Swanson <ma...@ScheduleWorld.com>.
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 <ma...@scheduleworld.com> 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

Re: FilePoller no longer deletes

Posted by Guillaume Nodet <gn...@gmail.com>.
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 <ma...@scheduleworld.com> 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?
>
> 2006-05-04 13:58:28,737 DEBUG AbstractFlow - Called Flow doRouting
> 2006-05-04 13:58:30,653 DEBUG FilePoller - Polling directory inbox
> 2006-05-04 13:58:30,654 DEBUG FilePoller - Scheduling file
> inbox/ScheduledBill.xml for processing
> 2006-05-04 13:58:30,655 DEBUG FilePoller - Processing file
> inbox/ScheduledBill.xml
> 2006-05-04 13:58:30,656 DEBUG DeliveryChannelImpl - Sending
> ID:localhost.localdomain-44411-1146763105364-5:1192 in
> DeliveryChannel{filePoller}
> 2006-05-04 13:58:30,663 DEBUG DeliveryChannelImpl - Sent: MessageExchange[
>    id: ID:localhost.localdomain-44411-1146763105364-5:1192
>    status: Active
>    role: consumer
>    service: {http://servicemix.apache.org/demo/}billScheduler
>    in: <?xml version="1.0" encoding="UTF-8"?><opbill:tes
> <test...
> ]
> 2006-05-04 13:58:30,664 DEBUG Broker - Routing exchange
> org.apache.servicemix.jbi.messaging.InOnlyImpl@324ff to:
> ServiceEndpoint[service={http://servicemix.apache.org/demo/}billScheduler,endpoint=billScheduler]
> 2006-05-04 13:58:30,665 DEBUG AbstractFlow - Called Flow send
> 2006-05-04 13:58:30,666 DEBUG AbstractFlow - Called Flow doRouting
>
>
> --
> 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
>