I'm looking at 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Main.java?view=markup

Do I need to extends MainSupport?

On a side note, why does using an activemq endpoint prevent my sample app from 
shutting down? 

-- 
@tommychheng
http://tommy.chheng.com

On Wednesday, March 2, 2011 at 8:22 AM, Claus Ibsen wrote: 
> See the Main class in camel-spring and/or camel-core.
> 
> 
> 
> 
> On Wed, Mar 2, 2011 at 5:20 PM, Tommy Chheng <[email protected]> wrote:
> > I want to define a route to poll from an amazon SQS queue.
> > val context = new DefaultCamelContext(reg)
> > context.setHandleFault(true)
> > context.addRoutes(new RouteBuilder{
> > override def configure(){
> > from("aws-sqs://test_development?amazonSQSClient=#test_sqs").to("log:b")
> > }}
> > )
> > context.start
> > where test_sqs is in the registry for an AmazonSQSClient(credentials) object
> > 
> > It seems to connect fine but when I run it(using mvn exec:java 
> > -Dexec.mainClass), but it shutsdown immediately after.
> > 
> > DefaultCamelContext Route: route1 started and consuming from: 
> > Endpoint[aws-sqs://test_development?amazonSQSClient=%23test_sqs]
> > 
> > How can I prevent the process from immediately shuting down? I want the 
> > process to run to continously poll the SQS queue.
> > 
> > If I replace the aws-sqs queue with a local activemq, the camel application 
> > runs successfully until issued a shutdown command.
> > context.addComponent("activemq", 
> > ActiveMQComponent.activeMQComponent(Config.activeMqConnection))
> > from("activemq:queue:a").to("log:b")
> > 
> > 
> > --
> > @tommychheng
> > http://tommy.chheng.com
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
> 

Reply via email to