You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/08/03 11:04:08 UTC

[2/6] CAMEL-4075 added camel-quartz2 component with thanks to Zemian

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml
new file mode 100644
index 0000000..3b055fd
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+  <!-- the persistent store for quartz -->
+  <jdbc:embedded-database id="camel_quartz" type="DERBY">
+    <jdbc:script location="classpath:tables_derby.sql"/>
+  </jdbc:embedded-database>
+
+  <bean id="quartz" class="org.apache.camel.component.quartz2.QuartzComponent">
+    <property name="scheduler" ref="scheduler"/>
+    <property name="autoStartScheduler" value="true"/>
+  </bean>
+
+  <!-- jdbc:initialize-database must come before this so the job store exists -->
+  <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
+    <property name="dataSource" ref="camel_quartz"/>
+    <property name="autoStartup" value="false"/>
+    <!-- let Camel start -->
+    <property name="schedulerContextAsMap">
+      <!-- hook Camel into Quartz -->
+      <map>
+        <entry key="CamelQuartzCamelContext" value-ref="camelContext"/>
+      </map>
+    </property>
+    <property name="quartzProperties">
+      <props>
+        <prop key="org.quartz.scheduler.instanceName">myscheduler</prop>
+        <prop key="org.quartz.scheduler.instanceId">AUTO</prop>
+        <prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>
+        <prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate</prop>
+        <prop key="org.quartz.jobStore.isClustered">false</prop>
+      </props>
+    </property>
+  </bean>
+
+  <camelContext id="camelContext" managementNamePattern="#name#" xmlns="http://camel.apache.org/schema/spring">
+    <route id="myRoute">
+      <from uri="quartz2://app/test?trigger.repeatInterval=1000&amp;trigger.repeatCount=-1&amp;stateful=true"/>
+      <to uri="log:trigger"/>
+      <to uri="mock:result"/>
+    </route>
+  </camelContext>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/myquartz.properties
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/myquartz.properties b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/myquartz.properties
new file mode 100644
index 0000000..5a3c6c1
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/myquartz.properties
@@ -0,0 +1,26 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+org.quartz.scheduler.instanceName = MyScheduler
+org.quartz.scheduler.instanceId = 2
+org.quartz.scheduler.rmi.export = false
+org.quartz.scheduler.rmi.proxy = false
+
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 3
+
+org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
new file mode 100644
index 0000000..63a8ea7
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/CronPolicies.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="date" class="org.apache.camel.routepolicy.quartz2.SimpleDate"/>
+
+    <bean id="defaultPolicy" class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy"/>
+
+    <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy">
+    	<property name="routeStartTime" value="*/3 * * * * ?"/>
+    </bean>
+    
+    <bean id="stopPolicy" class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy">
+    	<property name="routeStopTime" value="*/3 * * * * ?"/>
+	</bean>
+	
+	<bean id="suspendPolicy" class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy">
+    	<property name="routeSuspendTime" value="*/3 * * * * ?"/>
+  	</bean>
+  	
+  	<bean id="resumePolicy" class="org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy">
+    	<property name="routeResumeTime" value="*/3 * * * * ?"/>
+ 	</bean> 
+ 	
+    <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
+        <route id="testRoute">
+            <from uri="direct:start"/>
+            <to uri="mock:success"/>
+        </route>
+    </routeContext>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/MultiplePolicies.xml
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/MultiplePolicies.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/MultiplePolicies.xml
new file mode 100644
index 0000000..c2b5aee
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/MultiplePolicies.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="date" class="org.apache.camel.routepolicy.quartz2.SimpleDate"/>
+
+    <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy">
+    	<property name="routeStartDate" ref="date"/>
+    	<property name="routeStartRepeatCount" value="1"/>
+    	<property name="routeStartRepeatInterval" value="3000"/>    	
+    </bean>
+    
+    <bean id="throttlePolicy" class="org.apache.camel.impl.ThrottlingInflightRoutePolicy">
+    	<property name="maxInflightExchanges" value="10"/>    	
+	</bean>
+	 	
+    <camelContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
+        <route id="testRoute" autoStartup="false" routePolicyRef="startPolicy, throttlePolicy">
+            <from uri="seda:foo?concurrentConsumers=20"/>
+            <to uri="mock:success"/>
+        </route>
+    </camelContext>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
new file mode 100644
index 0000000..ea3aea8
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/SimplePolicies.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <bean id="date" class="org.apache.camel.routepolicy.quartz2.SimpleDate"/>
+
+    <bean id="defaultPolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy"/>
+
+    <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy">
+    	<property name="routeStartDate" ref="date"/>
+    	<property name="routeStartRepeatCount" value="1"/>
+    	<property name="routeStartRepeatInterval" value="3000"/>    	
+    </bean>
+    
+    <bean id="stopPolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy">
+    	<property name="routeStopDate" ref="date"/>
+    	<property name="routeStopRepeatCount" value="1"/>
+    	<property name="routeStopRepeatInterval" value="3000"/>    	
+	</bean>
+	
+	<bean id="suspendPolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy">
+    	<property name="routeSuspendDate" ref="date"/>
+    	<property name="routeSuspendRepeatCount" value="1"/>
+    	<property name="routeSuspendRepeatInterval" value="3000"/>    	
+  	</bean>
+  	
+  	<bean id="resumePolicy" class="org.apache.camel.routepolicy.quartz2.SimpleScheduledRoutePolicy">
+       	<property name="routeResumeDate" ref="date"/>
+    	<property name="routeResumeRepeatCount" value="1"/>
+    	<property name="routeResumeRepeatInterval" value="3000"/>    	
+ 	</bean> 
+ 	
+    <routeContext id="testRouteContext" xmlns="http://camel.apache.org/schema/spring">
+        <route id="testRoute">
+            <from uri="direct:start"/>
+            <to uri="mock:success"/>
+        </route>
+    </routeContext>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/myquartz.properties
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/myquartz.properties b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/myquartz.properties
new file mode 100644
index 0000000..5a3c6c1
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/org/apache/camel/routepolicy/quartz2/myquartz.properties
@@ -0,0 +1,26 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+org.quartz.scheduler.instanceName = MyScheduler
+org.quartz.scheduler.instanceId = 2
+org.quartz.scheduler.rmi.export = false
+org.quartz.scheduler.rmi.proxy = false
+
+org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount = 3
+
+org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/camel-quartz2/src/test/resources/tables_derby.sql
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/resources/tables_derby.sql b/components/camel-quartz2/src/test/resources/tables_derby.sql
new file mode 100644
index 0000000..538e577
--- /dev/null
+++ b/components/camel-quartz2/src/test/resources/tables_derby.sql
@@ -0,0 +1,174 @@
+-- 
+-- Apache Derby scripts by Steve Stewart, updated by Ronald Pomeroy
+-- Based on Srinivas Venkatarangaiah's file for Cloudscape
+-- 
+-- Known to work with Apache Derby 10.0.2.1, or 10.6.2.1
+--
+-- Updated by Zemian Deng <sa...@gmail.com> on 08/21/2011
+--   * Fixed nullable fields on qrtz_simprop_triggers table. 
+--   * Added Derby QuickStart comments and drop tables statements.
+--
+-- DerbyDB + Quartz Quick Guide:
+-- * Derby comes with Oracle JDK! For Java6, it default install into C:/Program Files/Sun/JavaDB on Windows.
+-- 1. Create a derby.properties file under JavaDB directory, and have the following:
+--    derby.connection.requireAuthentication = true
+--    derby.authentication.provider = BUILTIN
+--    derby.user.quartz2=quartz2123
+-- 2. Start the DB server by running bin/startNetworkServer script.
+-- 3. On a new terminal, run bin/ij tool to bring up an SQL prompt, then run:
+--    connect 'jdbc:derby://localhost:1527/quartz2;user=quartz2;password=quartz2123;create=true';
+--    run 'quartz/docs/dbTables/tables_derby.sql';
+-- Now in quartz.properties, you may use these properties:
+--    org.quartz.dataSource.quartzDataSource.driver = org.apache.derby.jdbc.ClientDriver
+--    org.quartz.dataSource.quartzDataSource.URL = jdbc:derby://localhost:1527/quartz2
+--    org.quartz.dataSource.quartzDataSource.user = quartz2
+--    org.quartz.dataSource.quartzDataSource.password = quartz2123
+--
+
+-- Auto drop and reset tables 
+-- Derby doesn't support if exists condition on table drop, so user must manually do this step if needed to.
+-- drop table qrtz_fired_triggers;
+-- drop table qrtz_paused_trigger_grps;
+-- drop table qrtz_scheduler_state;
+-- drop table qrtz_locks;
+-- drop table qrtz_simple_triggers;
+-- drop table qrtz_simprop_triggers;
+-- drop table qrtz_cron_triggers;
+-- drop table qrtz_blob_triggers;
+-- drop table qrtz_triggers;
+-- drop table qrtz_job_details;
+-- drop table qrtz_calendars;
+
+create table qrtz_job_details (
+sched_name varchar(120) not null,
+job_name varchar(200) not null,
+job_group varchar(200) not null,
+description varchar(250) ,
+job_class_name varchar(250) not null,
+is_durable varchar(5) not null,
+is_nonconcurrent varchar(5) not null,
+is_update_data varchar(5) not null,
+requests_recovery varchar(5) not null,
+job_data blob,
+primary key (sched_name,job_name,job_group)
+);
+
+create table qrtz_triggers(
+sched_name varchar(120) not null,
+trigger_name varchar(200) not null,
+trigger_group varchar(200) not null,
+job_name varchar(200) not null,
+job_group varchar(200) not null,
+description varchar(250),
+next_fire_time bigint,
+prev_fire_time bigint,
+priority integer,
+trigger_state varchar(16) not null,
+trigger_type varchar(8) not null,
+start_time bigint not null,
+end_time bigint,
+calendar_name varchar(200),
+misfire_instr smallint,
+job_data blob,
+primary key (sched_name,trigger_name,trigger_group),
+foreign key (sched_name,job_name,job_group) references qrtz_job_details(sched_name,job_name,job_group)
+);
+
+create table qrtz_simple_triggers(
+sched_name varchar(120) not null,
+trigger_name varchar(200) not null,
+trigger_group varchar(200) not null,
+repeat_count bigint not null,
+repeat_interval bigint not null,
+times_triggered bigint not null,
+primary key (sched_name,trigger_name,trigger_group),
+foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
+);
+
+create table qrtz_cron_triggers(
+sched_name varchar(120) not null,
+trigger_name varchar(200) not null,
+trigger_group varchar(200) not null,
+cron_expression varchar(120) not null,
+time_zone_id varchar(80),
+primary key (sched_name,trigger_name,trigger_group),
+foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
+);
+
+create table qrtz_simprop_triggers
+  (          
+    sched_name varchar(120) not null,
+    trigger_name varchar(200) not null,
+    trigger_group varchar(200) not null,
+    str_prop_1 varchar(512),
+    str_prop_2 varchar(512),
+    str_prop_3 varchar(512),
+    int_prop_1 int,
+    int_prop_2 int,
+    long_prop_1 bigint,
+    long_prop_2 bigint,
+    dec_prop_1 numeric(13,4),
+    dec_prop_2 numeric(13,4),
+    bool_prop_1 varchar(5),
+    bool_prop_2 varchar(5),
+    primary key (sched_name,trigger_name,trigger_group),
+    foreign key (sched_name,trigger_name,trigger_group) 
+    references qrtz_triggers(sched_name,trigger_name,trigger_group)
+);
+
+create table qrtz_blob_triggers(
+sched_name varchar(120) not null,
+trigger_name varchar(200) not null,
+trigger_group varchar(200) not null,
+blob_data blob,
+primary key (sched_name,trigger_name,trigger_group),
+foreign key (sched_name,trigger_name,trigger_group) references qrtz_triggers(sched_name,trigger_name,trigger_group)
+);
+
+create table qrtz_calendars(
+sched_name varchar(120) not null,
+calendar_name varchar(200) not null,
+calendar blob not null,
+primary key (sched_name,calendar_name)
+);
+
+create table qrtz_paused_trigger_grps
+  (
+    sched_name varchar(120) not null,
+    trigger_group varchar(200) not null,
+primary key (sched_name,trigger_group)
+);
+
+create table qrtz_fired_triggers(
+sched_name varchar(120) not null,
+entry_id varchar(95) not null,
+trigger_name varchar(200) not null,
+trigger_group varchar(200) not null,
+instance_name varchar(200) not null,
+fired_time bigint not null,
+sched_time bigint not null,
+priority integer not null,
+state varchar(16) not null,
+job_name varchar(200),
+job_group varchar(200),
+is_nonconcurrent varchar(5),
+requests_recovery varchar(5),
+primary key (sched_name,entry_id)
+);
+
+create table qrtz_scheduler_state
+  (
+    sched_name varchar(120) not null,
+    instance_name varchar(200) not null,
+    last_checkin_time bigint not null,
+    checkin_interval bigint not null,
+primary key (sched_name,instance_name)
+);
+
+create table qrtz_locks
+  (
+    sched_name varchar(120) not null,
+    lock_name varchar(40) not null,
+primary key (sched_name,lock_name)
+);
+

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index f52e83f..f0d7126 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -136,6 +136,7 @@
     <module>camel-printer</module>
     <module>camel-protobuf</module>
     <module>camel-quartz</module>
+    <module>camel-quartz2</module>
     <module>camel-quickfix</module>
     <module>camel-rabbitmq</module>
     <module>camel-restlet</module>

http://git-wip-us.apache.org/repos/asf/camel/blob/e429d7c0/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index e07278c..2c612e1 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -319,6 +319,7 @@
     <qpid-version>0.20</qpid-version>
     <quartz-bundle-version>1.8.6_1</quartz-bundle-version>
     <quartz-version>1.8.6</quartz-version>
+    <quartz2-version>2.2.0</quartz2-version>
     <quickfix-bundle-version>1.5.3_1</quickfix-bundle-version>
     <rabbitmq-amqp-client-version>3.1.3</rabbitmq-amqp-client-version>
     <regexp-bundle-version>1.4_1</regexp-bundle-version>