camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: svn commit: r954374 - in /camel/trunk: components/camel-quartz/src/main/java/org/apache/camel/component/quartz/ components/camel-quartz/src/test/java/org/apache/camel/component/quartz/ tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/o
Date Mon, 14 Jun 2010 07:51:50 GMT
Sorry, I should not commit the camel-quartz changes, will fix it in my 
next commit.

Willem

Claus Ibsen wrote:
> Hi Willem
> 
> Looks like you got some experimental code committed as well, such as
> quartz standby and some system out println
> 
> On Mon, Jun 14, 2010 at 8:46 AM,  <ningjiang@apache.org> wrote:
>> Author: ningjiang
>> Date: Mon Jun 14 06:46:02 2010
>> New Revision: 954374
>>
>> URL: http://svn.apache.org/viewvc?rev=954374&view=rev
>> Log:
>> CAMEL-2809 Fixed the CS error
>>
>> Modified:
>>    camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
>>    camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
>>    camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteTest.java
>>    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OsgiFactoryFinderTest.java
>>
>> Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
>> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java?rev=954374&r1=954373&r2=954374&view=diff
>> ==============================================================================
>> --- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
(original)
>> +++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
Mon Jun 14 06:46:02 2010
>> @@ -134,7 +134,7 @@ public class QuartzComponent extends Def
>>             if (number == 0) {
>>                 // no more jobs then shutdown the scheduler
>>                 LOG.info("There are no more jobs registered, so shutting down Quartz
scheduler: " + scheduler.getSchedulerName());
>> -                scheduler.shutdown();
>> +                scheduler.standby();
>>             }
>>         }
>>         super.doStop();
>>
>> Modified: camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
>> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java?rev=954374&r1=954373&r2=954374&view=diff
>> ==============================================================================
>> --- camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
(original)
>> +++ camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
Mon Jun 14 06:46:02 2010
>> @@ -197,6 +197,7 @@ public class QuartzEndpoint extends Defa
>>         getLoadBalancer().removeProcessor(consumer.getProcessor());
>>         if (getLoadBalancer().getProcessors().isEmpty() && started) {
>>             removeTrigger(getTrigger());
>> +            System.out.println("Remove the trigger");
>>             started = false;
>>         }
>>     }
>>
>> Modified: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteTest.java
>> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteTest.java?rev=954374&r1=954373&r2=954374&view=diff
>> ==============================================================================
>> --- camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteTest.java
(original)
>> +++ camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteTest.java
Mon Jun 14 06:46:02 2010
>> @@ -55,13 +55,30 @@ public class QuartzRouteTest extends Cam
>>             assertFalse(iterator.hasNext());
>>         }
>>     }
>> +
>> +    @Test
>> +    public void testStartAndStopCamelContext() throws Exception {
>> +        System.out.println("Routes " + context.getRoutes());
>> +        System.out.println("The endpoints" + context.getEndpoints());
>> +        //context.stopRoute("myRoute");
>> +        context.stop();
>> +        System.out.println("Routes " + context.getRoutes());
>> +        Thread.sleep(2000);
>> +
>> +        context.start();
>> +        System.out.println("Routes " + context.getRoutes());
>> +        context.addRoutes(createRouteBuilder());
>> +
>> +        testQuartzRoute();
>> +
>> +    }
>>
>>     @Override
>>     protected RouteBuilder createRouteBuilder() {
>>         return new RouteBuilder() {
>>             public void configure() {
>>                 // START SNIPPET: example
>> -                from("quartz://myGroup/myTimerName?trigger.repeatInterval=2&trigger.repeatCount=1").to("mock:result");
>> +                from("quartz://myGroup/myTimerName?trigger.repeatInterval=2&trigger.repeatCount=1").routeId("myRoute").to("mock:result");
>>                 // END SNIPPET: example
>>             }
>>         };
>>
>> Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OsgiFactoryFinderTest.java
>> URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OsgiFactoryFinderTest.java?rev=954374&r1=954373&r2=954374&view=diff
>> ==============================================================================
>> --- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OsgiFactoryFinderTest.java
(original)
>> +++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OsgiFactoryFinderTest.java
Mon Jun 14 06:46:02 2010
>> @@ -16,10 +16,7 @@
>>  */
>>  package org.apache.camel.itest.osgi;
>>
>> -import org.apache.camel.builder.RouteBuilder;
>>  import org.apache.camel.spi.FactoryFinder;
>> -import org.apache.commons.logging.Log;
>> -import org.apache.commons.logging.LogFactory;
>>  import org.junit.Before;
>>  import org.junit.Test;
>>  import org.junit.runner.RunWith;
>>
>>
>>
> 
> 
> 


Mime
View raw message