camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Can't restart camel context when using camel-quartz
Date Sat, 12 Jun 2010 03:21:07 GMT
It looks like CamelContext can't work rightly when it is stop and 
restart by let the Scheduler be involved.

Why don't you use the CamelContext to stop and start the route?
It much safe to use.

Willem

esmiralha wrote:
> I'm trying to stop and start my CamelContext that contains routes whose entry
> points are a Quartz trigger.
> When I stop the context and try to restart I get the following error:
> 
> org.quartz.SchedulerException: The Scheduler has been shutdown.
> 	at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
> 	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
> 	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
> 	at
> org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
> 	at
> org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
> 	at
> org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
> 	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
> 	at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
> 	at
> br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
> 	at
> br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
> 	at
> br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> 	at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> 	at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 
> Is there something I can do to avoid this?
> 
> Thanks!


Mime
View raw message