On Wed, Oct 6, 2010 at 3:15 PM, Russell, Brian <bruss...@medplus.com> wrote: > That makes sense logically in terms of what is needed, but quartz does > this by default. In doing this in a straight quartz context, I was able > to do this through configuration (and setting up the quartz database > tables). > > Is this type of functionality not implemented yet in camel or do I need > to write the specific code to to this? Or am I missing something? >
No you just need to configure Quartz to be clustered with the DB stuff. Then you just configure the QuartzComponent to use your quartz.properties file See: http://camel.apache.org/quartz > Thanks for your help. > > > -----Original Message----- > From: Hadrian Zbarcea [mailto:hzbar...@gmail.com] > Sent: Wednesday, October 06, 2010 9:05 AM > To: users@camel.apache.org > Subject: Re: Quartz Camel Spring Example? > > Yes, it is fairly easy. You have to have a way though to communicate > across instances in a cluster. So you will need a processor that sets > the lock and a filter that will drop the quartz message (trigger event) > if not the first. > > I hope this helps. > Hadrian > > > On Oct 6, 2010, at 8:57 AM, Russell, Brian wrote: > >> I did get this working for a single server -- thank you. >> >> As a follow-up, how can I implement this in a singleton mode across a > cluster? >> >> I need the trigger to only fire on one server in the cluster at a > time. >> >> I have this implemented using quartz outside of the camel context > where the clustered timers race to lock a database but only one wins and > actually fires. >> >> However, I am unclear on how this transfers into the camel > implementation. >> >> ? >> >> >> -----Original Message----- >> From: Claus Ibsen [mailto:claus.ib...@gmail.com] >> Sent: Tuesday, October 05, 2010 11:12 AM >> To: users@camel.apache.org >> Subject: Re: Quartz Camel Spring Example? >> >> On Tue, Oct 5, 2010 at 3:56 PM, Russell, Brian <bruss...@medplus.com> > wrote: >>> Thanks very much. I guess the part that I'm not understanding in > this >>> is how to get a List<Object> to return from a method where I can then >>> split it out based on a quart cron trigger. >>> >>> Let me ask it this way -- is the quartz implementation in camel >>> literally just the timer part of the process? So that, when it kicks >>> off, it pulls from your "from" endpoint to your "to" endpoint? >>> >> >> Yes quartz is just the scheduler. You can just use a bean/processor to >> get the List<Object>. >> >> from(qartz) >> to(beanThatGetTheList) >> ... >> >> >>> So I would have something like the following: >>> >>> <endpoint id="quartz_scheduler" >>> uri="quartz://quartTrigger?cron=0+0/1+*+*+*+?" /> >>> >>> <route id="route1"> >>> <from ref="quartz_scheduler" /> >>> <to ref="beanReturningListObject"> >>> <split> >>> <simple>body</simple> >>> <to ref="map_objects" /> >>> <to ref="jms_queue" /> >>> </split> >>> </route> >>> >>> Is quartz_scheduler just a cron expression or does it actually map to > a >>> bean? Does quartzTrigger need to be defined as a bean also? In my >>> quartz-only implementation, I actually create a custom trigger bean > and >>> a custom job bean. The job bean in that scenario would execute a >>> service layer to get the objects, iterate through them, move them to > a >>> MapMessage, and drop them on the queue. >>> >>> With this, I'm trying to have a quartz job return a List<Object and > drop >>> each object onto the queue. >>> >>> I'm just not quite following how this stream gets mapped together >>> through the spring configuration? >>> >>> ? >>> >>> >>> -----Original Message----- >>> From: Ashwin Karpe [mailto:aka...@fusesource.com] >>> Sent: Monday, October 04, 2010 3:14 PM >>> To: users@camel.apache.org >>> Subject: Re: Quartz Camel Spring Example? >>> >>> >>> Hi, >>> >>> Check out the following links >>> >>> > https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te >>> > st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest >>> .xml?view=markup >>> > https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te >>> > st/resources/org/apache/camel/component/quartz/SpringQuartzCronRouteTest >>> .xml?view=markup >>> >>> > https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te >>> > st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java >>> ?view=markup >>> > https://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/te >>> > st/java/org/apache/camel/component/quartz/SpringQuartzCronRouteTest.java >>> ?view=markup >>> >>> Cheers, >>> >>> Ashwin... >>> >>> >>> ----- >>> --------------------------------------------------------- >>> Ashwin Karpe >>> Apache Camel Committer & Sr Principal Consultant >>> FUSESource (a Progress Software Corporation subsidiary) >>> http://fusesource.com http://fusesource.com >>> >>> Blog: http://opensourceknowledge.blogspot.com >>> http://opensourceknowledge.blogspot.com >>> --------------------------------------------------------- >>> -- >>> View this message in context: >>> > http://camel.465427.n5.nabble.com/message-not-getting-delivered-tp307328 >>> 1p3198239.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Confidentiality Notice: The information contained in this electronic > transmission is confidential and may be legally privileged. It is > intended only for the addressee(s) named above. If you are not an > intended recipient, be aware that any disclosure, copying, distribution > or use of the information contained in this transmission is prohibited > and may be unlawful. If you have received this transmission in error, > please notify us by telephone (513) 229-5500 or by email > (postmas...@medplus.com). After replying, please erase it from your > computer system. >>> >>> >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> >> >> >> >> >> >> >> >> >> Confidentiality Notice: The information contained in this electronic > transmission is confidential and may be legally privileged. It is > intended only for the addressee(s) named above. If you are not an > intended recipient, be aware that any disclosure, copying, distribution > or use of the information contained in this transmission is prohibited > and may be unlawful. If you have received this transmission in error, > please notify us by telephone (513) 229-5500 or by email > (postmas...@medplus.com). After replying, please erase it from your > computer system. >> >> >> > > > > > > > > > > > > Confidentiality Notice: The information contained in this electronic > transmission is confidential and may be legally privileged. It is intended > only for the addressee(s) named above. If you are not an intended recipient, > be aware that any disclosure, copying, distribution or use of the information > contained in this transmission is prohibited and may be unlawful. If you have > received this transmission in error, please notify us by telephone (513) > 229-5500 or by email (postmas...@medplus.com). After replying, please erase > it from your computer system. > > > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus