You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by shekher awasthi <sh...@gmail.com> on 2011/08/08 08:46:12 UTC

Overriding ScheduledPollConsumer

Hi All,

While working around with camel i came across a requirement where i need to
pick a file from a directory only when user click on the execute button and
once it has been processed i want to avoid the polling
functionality build in camel
 for e.g
for this route
from("file:data/csv?fileName=input-customer2.csv?noop=true")

after processing the file camel keep polling data/csv folder till i am
closing the context which we want to avoid (no idea if this is a good
approach)
all we want it that once it route executed camel should not keep polling the
location, it should only poll the location when user click a button.


Thanks in advance
Umesh

Re: Overriding ScheduledPollConsumer

Posted by vishal1981 <vi...@ericsson.com>.
Hi Claus,

Am a little confused - Is this really fixed or am I interpreting this
incorrectly?

I have 2.10.2 and a route as bellow,

from("direct:start")
    	  .pollEnrich("file:myfolder?fileName=file.xml",1000)
    	  .process(new Processor()
    	  {
			@Override
			public void process(Exchange exchange) throws Exception {
				System.out.println("hello "+System.currentTimeMillis());
				
			}
    	  });
When I send it a message via,
ProducerTemplate pt  = camelContext.createProducerTemplate();
	  pt.sendBody("direct:start", "something");

Following happens,
1. If the file is not available an exchange with null body is send to the
processor defined inline. Shouldn't the timeout rather cause an exception?
2. After that one run it goes in a frenzy with messages like below,
TRACE - Scheduled task started on:  
Endpoint[file://myfolder?fileName=file.xml]
TRACE - Cannot start to poll: Endpoint[file://myfolder?fileName=file.xml] as
its suspended
It seems the like the scheduler infact does run, but realizes that it should
not do anything and sleeps again. Shouldn't it just stop completely?

thanks,
Vishal
 




--
View this message in context: http://camel.465427.n5.nabble.com/Overriding-ScheduledPollConsumer-tp4676752p5727372.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Overriding ScheduledPollConsumer

Posted by shekher awasthi <sh...@gmail.com>.
Thanks Claus!!!!

On Tue, Aug 9, 2011 at 1:44 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> Ah the issue is when Camel is starting, as the pollEnrich will cause
> the file consumer to start polling. After the first message has been
> processed, the pollEnrich will only run per demand.
>
> I have logged a ticket to track this, so on startup the file consumer
> will not be polling
> https://issues.apache.org/jira/browse/CAMEL-4318
>
> On Mon, Aug 8, 2011 at 12:16 PM, shekher awasthi
>  <sh...@gmail.com> wrote:
> > I tried the above configuration with apache 2.8 still its working in the
> > same pattern
> >
> >
> >
> from("direct:start").pollEnrich("file:data/csv?fileName=input-customer4.csv"
> > ).to("file:data/csvoutput?fileName=test11.xml");
> >
> > when route is getting executed camel keep polling the location data/csv
> >
> > here is the output from console
> >
> > main] RouteService DEBUG Starting child service on route: route1 ->
> > Channel[PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]]
> >
> > [ main] RouteService DEBUG Starting child service on route: route1 ->
> > PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]
> >
> > [ main] DefaultCamelContext DEBUG Route: route1 >>>
> > EventDrivenConsumerRoute[Endpoint[direct://start] ->
> > Instrumentation:route[UnitOfWork(Channel[PollEnrich[PollingConsumer on
> > Endpoint[file://data/csv?fileName=input-customer4.csv]]])]]
> >
> > [ main] DefaultCamelContext DEBUG Starting consumer (order: 1000) on
> route:
> > route1
> >
> > [ main] DefaultCamelContext INFO Route: route1 started and consuming
> from:
> > Endpoint[direct://start]
> >
> > [ main] DefaultCamelContext INFO Total 1 routes, of which 1 is started.
> >
> > [ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext:
> camel-1)
> > started in 0.183 seconds
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.004 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> > poll: data\csv
> >
> > *********************************
> >
> > [ main] DefaultCamelContext INFO Apache Camel 2.8.0
> (CamelContext:camel-1)
> > is shutting down
> >
> > [ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1
> routes
> > (timeout 300 seconds)
> >
> >
> >
> > is there something i am doing wrong or missing?
> >
> >
> > On Mon, Aug 8, 2011 at 3:16 PM, shekher awasthi
> > <sh...@gmail.com>wrote:
> >
> >> Thanks Claus!!
> >>
> >> i just read 2.8 release notes :)
> >>
> >>   On Mon, Aug 8, 2011 at 3:07 PM, Claus Ibsen <claus.ibsen@gmail.com
> >wrote:
> >>
> >>> On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
> >>> <sh...@gmail.com> wrote:
> >>> > Claus i am  confused  about what is fixed in 2.8 version ?
> >>> >
> >>> > since my problem here is
> >>> >  even i write this line
> >>> >
> >>> >
> >>>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >>> > camel keep polling data/scv folder till context is not closed.
> >>> >
> >>> > as you mentioned in previous reply the pollEnrich will poll only once
> so
> >>> i
> >>> > am clueless why its polling continuously in my case?
> >>> >
> >>>
> >>> Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.
> >>>
> >>>
> >>> > On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com>
> >>> wrote:
> >>> >
> >>> >> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
> >>> >> <sh...@gmail.com> wrote:
> >>> >> > i tried something this
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >>> >> >
> >>> >> > from("direct:end").unmarshal().csv().bean(*new
> >>> >> > *
> >>> >> >
> >>> >> >
> >>> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> >>> >> > "file:data/csvoutput?fileName=test11.xml");
> >>> >> > still it polling the folder data/csv multiple time
> >>> >> >
> >>> >>
> >>> >> This is fixed in Camel 2.8.0
> >>> >>
> >>> >>
> >>> >> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <
> claus.ibsen@gmail.com>
> >>> >> wrote:
> >>> >> >
> >>> >> >> Hi
> >>> >> >>
> >>> >> >> You can alternative stop the route from the route. See this FAQ
> >>> >> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
> >>> >> >>
> >>> >> >> You may also want to look at the Content Enricher EIP
> >>> >> >> http://camel.apache.org/content-enricher.html
> >>> >> >>
> >>> >> >> Where you can from a route poll the file, using pollEnrich, which
> >>> will
> >>> >> >> poll the file once.
> >>> >> >> This allows you to start the route from a direct consumer or
> >>> something
> >>> >> >> else. And thus only poll the file on demand.
> >>> >> >>
> >>> >> >>
> >>> >> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
> >>> >> >> <sh...@gmail.com> wrote:
> >>> >> >> > Hi All,
> >>> >> >> >
> >>> >> >> > While working around with camel i came across a requirement
> where
> >>> i
> >>> >> need
> >>> >> >> to
> >>> >> >> > pick a file from a directory only when user click on the
> execute
> >>> >> button
> >>> >> >> and
> >>> >> >> > once it has been processed i want to avoid the polling
> >>> >> >> > functionality build in camel
> >>> >> >> >  for e.g
> >>> >> >> > for this route
> >>> >> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
> >>> >> >> >
> >>> >> >> > after processing the file camel keep polling data/csv folder
> till
> >>> i am
> >>> >> >> > closing the context which we want to avoid (no idea if this is
> a
> >>> good
> >>> >> >> > approach)
> >>> >> >> > all we want it that once it route executed camel should not
> keep
> >>> >> polling
> >>> >> >> the
> >>> >> >> > location, it should only poll the location when user click a
> >>> button.
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > Thanks in advance
> >>> >> >> > Umesh
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> --
> >>> >> >> Claus Ibsen
> >>> >> >> -----------------
> >>> >> >> FuseSource
> >>> >> >> Email: cibsen@fusesource.com
> >>> >> >> Web: http://fusesource.com
> >>> >> >> Twitter: davsclaus, fusenews
> >>> >> >> Blog: http://davsclaus.blogspot.com/
> >>> >> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>> >> >>
> >>> >> >
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >>  Claus Ibsen
> >>> >> -----------------
> >>> >> FuseSource
> >>> >> Email: cibsen@fusesource.com
> >>> >> Web: http://fusesource.com
> >>> >> Twitter: davsclaus, fusenews
> >>> >> Blog: http://davsclaus.blogspot.com/
> >>> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>> >>
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>>  Claus Ibsen
> >>> -----------------
> >>> FuseSource
> >>> Email: cibsen@fusesource.com
> >>> Web: http://fusesource.com
> >>> Twitter: davsclaus, fusenews
> >>> Blog: http://davsclaus.blogspot.com/
> >>> Author of Camel in Action: http://www.manning.com/ibsen/
> >>>
> >>
> >>
> >
>
>
>
> --
>  Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Overriding ScheduledPollConsumer

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah the issue is when Camel is starting, as the pollEnrich will cause
the file consumer to start polling. After the first message has been
processed, the pollEnrich will only run per demand.

I have logged a ticket to track this, so on startup the file consumer
will not be polling
https://issues.apache.org/jira/browse/CAMEL-4318

On Mon, Aug 8, 2011 at 12:16 PM, shekher awasthi
<sh...@gmail.com> wrote:
> I tried the above configuration with apache 2.8 still its working in the
> same pattern
>
>
> from("direct:start").pollEnrich("file:data/csv?fileName=input-customer4.csv"
> ).to("file:data/csvoutput?fileName=test11.xml");
>
> when route is getting executed camel keep polling the location data/csv
>
> here is the output from console
>
> main] RouteService DEBUG Starting child service on route: route1 ->
> Channel[PollEnrich[PollingConsumer on
> Endpoint[file://data/csv?fileName=input-customer4.csv]]]
>
> [ main] RouteService DEBUG Starting child service on route: route1 ->
> PollEnrich[PollingConsumer on
> Endpoint[file://data/csv?fileName=input-customer4.csv]]
>
> [ main] DefaultCamelContext DEBUG Route: route1 >>>
> EventDrivenConsumerRoute[Endpoint[direct://start] ->
> Instrumentation:route[UnitOfWork(Channel[PollEnrich[PollingConsumer on
> Endpoint[file://data/csv?fileName=input-customer4.csv]]])]]
>
> [ main] DefaultCamelContext DEBUG Starting consumer (order: 1000) on route:
> route1
>
> [ main] DefaultCamelContext INFO Route: route1 started and consuming from:
> Endpoint[direct://start]
>
> [ main] DefaultCamelContext INFO Total 1 routes, of which 1 is started.
>
> [ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext: camel-1)
> started in 0.183 seconds
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.004 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> [1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
> poll: data\csv
>
> *********************************
>
> [ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext:camel-1)
> is shutting down
>
> [ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes
> (timeout 300 seconds)
>
>
>
> is there something i am doing wrong or missing?
>
>
> On Mon, Aug 8, 2011 at 3:16 PM, shekher awasthi
> <sh...@gmail.com>wrote:
>
>> Thanks Claus!!
>>
>> i just read 2.8 release notes :)
>>
>>   On Mon, Aug 8, 2011 at 3:07 PM, Claus Ibsen <cl...@gmail.com>wrote:
>>
>>> On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
>>> <sh...@gmail.com> wrote:
>>> > Claus i am  confused  about what is fixed in 2.8 version ?
>>> >
>>> > since my problem here is
>>> >  even i write this line
>>> >
>>> >
>>> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>>> > camel keep polling data/scv folder till context is not closed.
>>> >
>>> > as you mentioned in previous reply the pollEnrich will poll only once so
>>> i
>>> > am clueless why its polling continuously in my case?
>>> >
>>>
>>> Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.
>>>
>>>
>>> > On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com>
>>> wrote:
>>> >
>>> >> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
>>> >> <sh...@gmail.com> wrote:
>>> >> > i tried something this
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>>> >> >
>>> >> > from("direct:end").unmarshal().csv().bean(*new
>>> >> > *
>>> >> >
>>> >> >
>>> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
>>> >> > "file:data/csvoutput?fileName=test11.xml");
>>> >> > still it polling the folder data/csv multiple time
>>> >> >
>>> >>
>>> >> This is fixed in Camel 2.8.0
>>> >>
>>> >>
>>> >> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >> Hi
>>> >> >>
>>> >> >> You can alternative stop the route from the route. See this FAQ
>>> >> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>>> >> >>
>>> >> >> You may also want to look at the Content Enricher EIP
>>> >> >> http://camel.apache.org/content-enricher.html
>>> >> >>
>>> >> >> Where you can from a route poll the file, using pollEnrich, which
>>> will
>>> >> >> poll the file once.
>>> >> >> This allows you to start the route from a direct consumer or
>>> something
>>> >> >> else. And thus only poll the file on demand.
>>> >> >>
>>> >> >>
>>> >> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
>>> >> >> <sh...@gmail.com> wrote:
>>> >> >> > Hi All,
>>> >> >> >
>>> >> >> > While working around with camel i came across a requirement where
>>> i
>>> >> need
>>> >> >> to
>>> >> >> > pick a file from a directory only when user click on the execute
>>> >> button
>>> >> >> and
>>> >> >> > once it has been processed i want to avoid the polling
>>> >> >> > functionality build in camel
>>> >> >> >  for e.g
>>> >> >> > for this route
>>> >> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
>>> >> >> >
>>> >> >> > after processing the file camel keep polling data/csv folder till
>>> i am
>>> >> >> > closing the context which we want to avoid (no idea if this is a
>>> good
>>> >> >> > approach)
>>> >> >> > all we want it that once it route executed camel should not keep
>>> >> polling
>>> >> >> the
>>> >> >> > location, it should only poll the location when user click a
>>> button.
>>> >> >> >
>>> >> >> >
>>> >> >> > Thanks in advance
>>> >> >> > Umesh
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Claus Ibsen
>>> >> >> -----------------
>>> >> >> FuseSource
>>> >> >> Email: cibsen@fusesource.com
>>> >> >> Web: http://fusesource.com
>>> >> >> Twitter: davsclaus, fusenews
>>> >> >> Blog: http://davsclaus.blogspot.com/
>>> >> >> Author of Camel in Action: http://www.manning.com/ibsen/
>>> >> >>
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >>  Claus Ibsen
>>> >> -----------------
>>> >> FuseSource
>>> >> Email: cibsen@fusesource.com
>>> >> Web: http://fusesource.com
>>> >> Twitter: davsclaus, fusenews
>>> >> Blog: http://davsclaus.blogspot.com/
>>> >> Author of Camel in Action: http://www.manning.com/ibsen/
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>>  Claus Ibsen
>>> -----------------
>>> FuseSource
>>> Email: cibsen@fusesource.com
>>> Web: http://fusesource.com
>>> Twitter: davsclaus, fusenews
>>> Blog: http://davsclaus.blogspot.com/
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>
>>
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Overriding ScheduledPollConsumer

Posted by shekher awasthi <sh...@gmail.com>.
I tried the above configuration with apache 2.8 still its working in the
same pattern


from("direct:start").pollEnrich("file:data/csv?fileName=input-customer4.csv"
).to("file:data/csvoutput?fileName=test11.xml");

when route is getting executed camel keep polling the location data/csv

here is the output from console

main] RouteService DEBUG Starting child service on route: route1 ->
Channel[PollEnrich[PollingConsumer on
Endpoint[file://data/csv?fileName=input-customer4.csv]]]

[ main] RouteService DEBUG Starting child service on route: route1 ->
PollEnrich[PollingConsumer on
Endpoint[file://data/csv?fileName=input-customer4.csv]]

[ main] DefaultCamelContext DEBUG Route: route1 >>>
EventDrivenConsumerRoute[Endpoint[direct://start] ->
Instrumentation:route[UnitOfWork(Channel[PollEnrich[PollingConsumer on
Endpoint[file://data/csv?fileName=input-customer4.csv]]])]]

[ main] DefaultCamelContext DEBUG Starting consumer (order: 1000) on route:
route1

[ main] DefaultCamelContext INFO Route: route1 started and consuming from:
Endpoint[direct://start]

[ main] DefaultCamelContext INFO Total 1 routes, of which 1 is started.

[ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext: camel-1)
started in 0.183 seconds

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.004 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.001 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

[1) thread #0 - file://data/csv] FileConsumer DEBUG Took 0.000 seconds to
poll: data\csv

*********************************

[ main] DefaultCamelContext INFO Apache Camel 2.8.0 (CamelContext:camel-1)
is shutting down

[ main] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes
(timeout 300 seconds)



is there something i am doing wrong or missing?


On Mon, Aug 8, 2011 at 3:16 PM, shekher awasthi
<sh...@gmail.com>wrote:

> Thanks Claus!!
>
> i just read 2.8 release notes :)
>
>   On Mon, Aug 8, 2011 at 3:07 PM, Claus Ibsen <cl...@gmail.com>wrote:
>
>> On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
>> <sh...@gmail.com> wrote:
>> > Claus i am  confused  about what is fixed in 2.8 version ?
>> >
>> > since my problem here is
>> >  even i write this line
>> >
>> >
>> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>> > camel keep polling data/scv folder till context is not closed.
>> >
>> > as you mentioned in previous reply the pollEnrich will poll only once so
>> i
>> > am clueless why its polling continuously in my case?
>> >
>>
>> Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.
>>
>>
>> > On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> >> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
>> >> <sh...@gmail.com> wrote:
>> >> > i tried something this
>> >> >
>> >> >
>> >> >
>> >>
>> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>> >> >
>> >> > from("direct:end").unmarshal().csv().bean(*new
>> >> > *
>> >> >
>> >> >
>> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
>> >> > "file:data/csvoutput?fileName=test11.xml");
>> >> > still it polling the folder data/csv multiple time
>> >> >
>> >>
>> >> This is fixed in Camel 2.8.0
>> >>
>> >>
>> >> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com>
>> >> wrote:
>> >> >
>> >> >> Hi
>> >> >>
>> >> >> You can alternative stop the route from the route. See this FAQ
>> >> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>> >> >>
>> >> >> You may also want to look at the Content Enricher EIP
>> >> >> http://camel.apache.org/content-enricher.html
>> >> >>
>> >> >> Where you can from a route poll the file, using pollEnrich, which
>> will
>> >> >> poll the file once.
>> >> >> This allows you to start the route from a direct consumer or
>> something
>> >> >> else. And thus only poll the file on demand.
>> >> >>
>> >> >>
>> >> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
>> >> >> <sh...@gmail.com> wrote:
>> >> >> > Hi All,
>> >> >> >
>> >> >> > While working around with camel i came across a requirement where
>> i
>> >> need
>> >> >> to
>> >> >> > pick a file from a directory only when user click on the execute
>> >> button
>> >> >> and
>> >> >> > once it has been processed i want to avoid the polling
>> >> >> > functionality build in camel
>> >> >> >  for e.g
>> >> >> > for this route
>> >> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
>> >> >> >
>> >> >> > after processing the file camel keep polling data/csv folder till
>> i am
>> >> >> > closing the context which we want to avoid (no idea if this is a
>> good
>> >> >> > approach)
>> >> >> > all we want it that once it route executed camel should not keep
>> >> polling
>> >> >> the
>> >> >> > location, it should only poll the location when user click a
>> button.
>> >> >> >
>> >> >> >
>> >> >> > Thanks in advance
>> >> >> > Umesh
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Claus Ibsen
>> >> >> -----------------
>> >> >> FuseSource
>> >> >> Email: cibsen@fusesource.com
>> >> >> Web: http://fusesource.com
>> >> >> Twitter: davsclaus, fusenews
>> >> >> Blog: http://davsclaus.blogspot.com/
>> >> >> Author of Camel in Action: http://www.manning.com/ibsen/
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >>  Claus Ibsen
>> >> -----------------
>> >> FuseSource
>> >> Email: cibsen@fusesource.com
>> >> Web: http://fusesource.com
>> >> Twitter: davsclaus, fusenews
>> >> Blog: http://davsclaus.blogspot.com/
>> >> Author of Camel in Action: http://www.manning.com/ibsen/
>> >>
>> >
>>
>>
>>
>> --
>>  Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>
>

Re: Overriding ScheduledPollConsumer

Posted by shekher awasthi <sh...@gmail.com>.
Thanks Claus!!

i just read 2.8 release notes :)

On Mon, Aug 8, 2011 at 3:07 PM, Claus Ibsen <cl...@gmail.com> wrote:

> On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
> <sh...@gmail.com> wrote:
> > Claus i am  confused  about what is fixed in 2.8 version ?
> >
> > since my problem here is
> >  even i write this line
> >
> >
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> > camel keep polling data/scv folder till context is not closed.
> >
> > as you mentioned in previous reply the pollEnrich will poll only once so
> i
> > am clueless why its polling continuously in my case?
> >
>
> Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.
>
>
> > On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
> >> <sh...@gmail.com> wrote:
> >> > i tried something this
> >> >
> >> >
> >> >
> >>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >> >
> >> > from("direct:end").unmarshal().csv().bean(*new
> >> > *
> >> >
> >> >
> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> >> > "file:data/csvoutput?fileName=test11.xml");
> >> > still it polling the folder data/csv multiple time
> >> >
> >>
> >> This is fixed in Camel 2.8.0
> >>
> >>
> >> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com>
> >> wrote:
> >> >
> >> >> Hi
> >> >>
> >> >> You can alternative stop the route from the route. See this FAQ
> >> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
> >> >>
> >> >> You may also want to look at the Content Enricher EIP
> >> >> http://camel.apache.org/content-enricher.html
> >> >>
> >> >> Where you can from a route poll the file, using pollEnrich, which
> will
> >> >> poll the file once.
> >> >> This allows you to start the route from a direct consumer or
> something
> >> >> else. And thus only poll the file on demand.
> >> >>
> >> >>
> >> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
> >> >> <sh...@gmail.com> wrote:
> >> >> > Hi All,
> >> >> >
> >> >> > While working around with camel i came across a requirement where i
> >> need
> >> >> to
> >> >> > pick a file from a directory only when user click on the execute
> >> button
> >> >> and
> >> >> > once it has been processed i want to avoid the polling
> >> >> > functionality build in camel
> >> >> >  for e.g
> >> >> > for this route
> >> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
> >> >> >
> >> >> > after processing the file camel keep polling data/csv folder till i
> am
> >> >> > closing the context which we want to avoid (no idea if this is a
> good
> >> >> > approach)
> >> >> > all we want it that once it route executed camel should not keep
> >> polling
> >> >> the
> >> >> > location, it should only poll the location when user click a
> button.
> >> >> >
> >> >> >
> >> >> > Thanks in advance
> >> >> > Umesh
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Claus Ibsen
> >> >> -----------------
> >> >> FuseSource
> >> >> Email: cibsen@fusesource.com
> >> >> Web: http://fusesource.com
> >> >> Twitter: davsclaus, fusenews
> >> >> Blog: http://davsclaus.blogspot.com/
> >> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >>  Claus Ibsen
> >> -----------------
> >> FuseSource
> >> Email: cibsen@fusesource.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus, fusenews
> >> Blog: http://davsclaus.blogspot.com/
> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>
> >
>
>
>
> --
>  Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Overriding ScheduledPollConsumer

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Aug 8, 2011 at 11:29 AM, shekher awasthi
<sh...@gmail.com> wrote:
> Claus i am  confused  about what is fixed in 2.8 version ?
>
> since my problem here is
>  even i write this line
>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> camel keep polling data/scv folder till context is not closed.
>
> as you mentioned in previous reply the pollEnrich will poll only once so i
> am clueless why its polling continuously in my case?
>

Camel 2.8 fixes pollEnrich keep polling when using file/ftp endpoints.


> On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
>> <sh...@gmail.com> wrote:
>> > i tried something this
>> >
>> >
>> >
>> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>> >
>> > from("direct:end").unmarshal().csv().bean(*new
>> > *
>> >
>> > CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
>> > "file:data/csvoutput?fileName=test11.xml");
>> > still it polling the folder data/csv multiple time
>> >
>>
>> This is fixed in Camel 2.8.0
>>
>>
>> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> >> Hi
>> >>
>> >> You can alternative stop the route from the route. See this FAQ
>> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>> >>
>> >> You may also want to look at the Content Enricher EIP
>> >> http://camel.apache.org/content-enricher.html
>> >>
>> >> Where you can from a route poll the file, using pollEnrich, which will
>> >> poll the file once.
>> >> This allows you to start the route from a direct consumer or something
>> >> else. And thus only poll the file on demand.
>> >>
>> >>
>> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
>> >> <sh...@gmail.com> wrote:
>> >> > Hi All,
>> >> >
>> >> > While working around with camel i came across a requirement where i
>> need
>> >> to
>> >> > pick a file from a directory only when user click on the execute
>> button
>> >> and
>> >> > once it has been processed i want to avoid the polling
>> >> > functionality build in camel
>> >> >  for e.g
>> >> > for this route
>> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
>> >> >
>> >> > after processing the file camel keep polling data/csv folder till i am
>> >> > closing the context which we want to avoid (no idea if this is a good
>> >> > approach)
>> >> > all we want it that once it route executed camel should not keep
>> polling
>> >> the
>> >> > location, it should only poll the location when user click a button.
>> >> >
>> >> >
>> >> > Thanks in advance
>> >> > Umesh
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> FuseSource
>> >> Email: cibsen@fusesource.com
>> >> Web: http://fusesource.com
>> >> Twitter: davsclaus, fusenews
>> >> Blog: http://davsclaus.blogspot.com/
>> >> Author of Camel in Action: http://www.manning.com/ibsen/
>> >>
>> >
>>
>>
>>
>> --
>>  Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Overriding ScheduledPollConsumer

Posted by shekher awasthi <sh...@gmail.com>.
Claus i am  confused  about what is fixed in 2.8 version ?

since my problem here is
 even i write this line

from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
camel keep polling data/scv folder till context is not closed.

as you mentioned in previous reply the pollEnrich will poll only once so i
am clueless why its polling continuously in my case?

On Mon, Aug 8, 2011 at 2:53 PM, Claus Ibsen <cl...@gmail.com> wrote:

> On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
> <sh...@gmail.com> wrote:
> > i tried something this
> >
> >
> >
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
> >
> > from("direct:end").unmarshal().csv().bean(*new
> > *
> >
> > CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> > "file:data/csvoutput?fileName=test11.xml");
> > still it polling the folder data/csv multiple time
> >
>
> This is fixed in Camel 2.8.0
>
>
> > On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> Hi
> >>
> >> You can alternative stop the route from the route. See this FAQ
> >> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
> >>
> >> You may also want to look at the Content Enricher EIP
> >> http://camel.apache.org/content-enricher.html
> >>
> >> Where you can from a route poll the file, using pollEnrich, which will
> >> poll the file once.
> >> This allows you to start the route from a direct consumer or something
> >> else. And thus only poll the file on demand.
> >>
> >>
> >> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
> >> <sh...@gmail.com> wrote:
> >> > Hi All,
> >> >
> >> > While working around with camel i came across a requirement where i
> need
> >> to
> >> > pick a file from a directory only when user click on the execute
> button
> >> and
> >> > once it has been processed i want to avoid the polling
> >> > functionality build in camel
> >> >  for e.g
> >> > for this route
> >> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
> >> >
> >> > after processing the file camel keep polling data/csv folder till i am
> >> > closing the context which we want to avoid (no idea if this is a good
> >> > approach)
> >> > all we want it that once it route executed camel should not keep
> polling
> >> the
> >> > location, it should only poll the location when user click a button.
> >> >
> >> >
> >> > Thanks in advance
> >> > Umesh
> >> >
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> FuseSource
> >> Email: cibsen@fusesource.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus, fusenews
> >> Blog: http://davsclaus.blogspot.com/
> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>
> >
>
>
>
> --
>  Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Overriding ScheduledPollConsumer

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Aug 8, 2011 at 11:14 AM, shekher awasthi
<sh...@gmail.com> wrote:
> i tried something this
>
>
> from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");
>
> from("direct:end").unmarshal().csv().bean(*new
> *
>
> CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
> "file:data/csvoutput?fileName=test11.xml");
> still it polling the folder data/csv multiple time
>

This is fixed in Camel 2.8.0


> On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> Hi
>>
>> You can alternative stop the route from the route. See this FAQ
>> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>>
>> You may also want to look at the Content Enricher EIP
>> http://camel.apache.org/content-enricher.html
>>
>> Where you can from a route poll the file, using pollEnrich, which will
>> poll the file once.
>> This allows you to start the route from a direct consumer or something
>> else. And thus only poll the file on demand.
>>
>>
>> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
>> <sh...@gmail.com> wrote:
>> > Hi All,
>> >
>> > While working around with camel i came across a requirement where i need
>> to
>> > pick a file from a directory only when user click on the execute button
>> and
>> > once it has been processed i want to avoid the polling
>> > functionality build in camel
>> >  for e.g
>> > for this route
>> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
>> >
>> > after processing the file camel keep polling data/csv folder till i am
>> > closing the context which we want to avoid (no idea if this is a good
>> > approach)
>> > all we want it that once it route executed camel should not keep polling
>> the
>> > location, it should only poll the location when user click a button.
>> >
>> >
>> > Thanks in advance
>> > Umesh
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Overriding ScheduledPollConsumer

Posted by shekher awasthi <sh...@gmail.com>.
i tried something this


from("direct:start").pollEnrich("file:data/csv?noop=true").to("direct:end");

from("direct:end").unmarshal().csv().bean(*new
*

CSVConverterBean(),"processCSVInvoice").to("xslt:XMLConverter.xsl").to(
"file:data/csvoutput?fileName=test11.xml");
still it polling the folder data/csv multiple time

On Mon, Aug 8, 2011 at 2:04 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> You can alternative stop the route from the route. See this FAQ
> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>
> You may also want to look at the Content Enricher EIP
> http://camel.apache.org/content-enricher.html
>
> Where you can from a route poll the file, using pollEnrich, which will
> poll the file once.
> This allows you to start the route from a direct consumer or something
> else. And thus only poll the file on demand.
>
>
> On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
> <sh...@gmail.com> wrote:
> > Hi All,
> >
> > While working around with camel i came across a requirement where i need
> to
> > pick a file from a directory only when user click on the execute button
> and
> > once it has been processed i want to avoid the polling
> > functionality build in camel
> >  for e.g
> > for this route
> > from("file:data/csv?fileName=input-customer2.csv?noop=true")
> >
> > after processing the file camel keep polling data/csv folder till i am
> > closing the context which we want to avoid (no idea if this is a good
> > approach)
> > all we want it that once it route executed camel should not keep polling
> the
> > location, it should only poll the location when user click a button.
> >
> >
> > Thanks in advance
> > Umesh
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Overriding ScheduledPollConsumer

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can alternative stop the route from the route. See this FAQ
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html

You may also want to look at the Content Enricher EIP
http://camel.apache.org/content-enricher.html

Where you can from a route poll the file, using pollEnrich, which will
poll the file once.
This allows you to start the route from a direct consumer or something
else. And thus only poll the file on demand.


On Mon, Aug 8, 2011 at 8:46 AM, shekher awasthi
<sh...@gmail.com> wrote:
> Hi All,
>
> While working around with camel i came across a requirement where i need to
> pick a file from a directory only when user click on the execute button and
> once it has been processed i want to avoid the polling
> functionality build in camel
>  for e.g
> for this route
> from("file:data/csv?fileName=input-customer2.csv?noop=true")
>
> after processing the file camel keep polling data/csv folder till i am
> closing the context which we want to avoid (no idea if this is a good
> approach)
> all we want it that once it route executed camel should not keep polling the
> location, it should only poll the location when user click a button.
>
>
> Thanks in advance
> Umesh
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/