Hi If you have the app crash using kill -3 / -9 and then start it again and expect quartz to recover and it does not. Then I think you should ask at the Quartz user forum about this.
And maybe you can create a plain example with pure Quartz to not pollute the example with Camel as the Quartz guys would just say its a Camel problem. Just as I say its most likely a Quartz problem :) And if there is something that must be configured / tweaked in Quartz to have this working then let us know. Maybe there is something we can do easier in camel-quartz for that. On Thu, Jun 3, 2010 at 12:08 PM, Ingo Düppe <mailing-li...@dueppe.com> wrote: > Am 01.06.10 08:37, schrieb Claus Ibsen: >> On Mon, May 31, 2010 at 6:48 PM, Ingo Düppe <mailing-li...@dueppe.com> wrote: >> >>> I forgot to mention that I currently use version 2.2.0. >>> >>> >> Can you create a small sample application that demonstrates this? Then >> its much easier to look into it to see what / if we can do in Camel. >> >>> - Ingo >>> >>> >>> > Sure, i created a small example that you can find at > http://dl.dropbox.com/u/4043036/quartz-cluster.tar.gz. > > It contains just a small JUnit Test Case (see below). The test runs fine > as long you execute the whole test. As I find out yesterday, quartz > deletes some information within the database on a clean shutdown. > So the next test run will also run fine. > But if you kill the running test - to simulate a server crash - the next > test run will end up with an exception. > > So how do I handle such inconsist data on startup of camel? > > Regards > Ingo > > @RunWith(SpringJUnit4ClassRunner.class) > @ContextConfiguration( > locations = { > "classpath*:context-test.xml" > } > ) > public class QuartzClusterTest extends TestCase { > > �...@autowired > private CamelContext camelContext; > > �...@endpointinject(uri = "mock:result") > protected MockEndpoint resultEndpoint; > > �...@test > �...@dirtiescontext > �...@repeat(value=2) > public void testTriggering() throws Exception { > camelContext.addRoutes(new QuartzRouteBuilder()); > resultEndpoint.setMinimumExpectedMessageCount(5); > resultEndpoint.setResultWaitTime(5000L); > resultEndpoint.assertIsSatisfied(); > } > > public static class QuartzRouteBuilder extends RouteBuilder { > > �...@override > public void configure() throws Exception { > > from("quartz://trigger?stateful=true&cron=0/1+*+*+*+*+?").to("mock:result"); > } > } > } > > > > > -- 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