This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 858727e46d Simplify support for Quartz clustering
858727e46d is described below
commit 858727e46d6930aefafe302d35d339e7f73e6de6
Author: James Netherton <[email protected]>
AuthorDate: Wed Jun 29 11:15:15 2022 +0100
Simplify support for Quartz clustering
Fixes #3850
---
.../modules/ROOT/pages/migration-guide/2.11.0.adoc | 9 ++
docs/modules/ROOT/pages/migration-guide/index.adoc | 1 +
.../ROOT/pages/reference/extensions/quartz.adoc | 116 +++++++++++---------
.../quartz/deployment/QuartzProcessor.java | 7 +-
extensions/quartz/runtime/pom.xml | 5 -
.../quartz/runtime/src/main/doc/limitations.adoc | 4 -
extensions/quartz/runtime/src/main/doc/usage.adoc | 114 +++++++++++--------
.../CamelQuarkusQuartzConnectionProvider.java | 66 -----------
integration-tests/pom.xml | 1 +
.../{quartz => quartz-clustered}/pom.xml | 78 +++++++------
.../quartz/it/QuartzClusteredResource.java | 56 ++++++++++
.../component/quartz/it/QuartzClusteredRoutes.java | 36 ++++++
.../src/main/resources/application.properties | 39 +++++++
.../db/migration/V1.0.1__QuarkusQuartz.sql | 0
.../component/quartz/it/QuartzClusteredIT.java | 24 ++++
.../component/quartz/it/QuartzClusteredTest.java | 121 +++++++++++++++++++++
integration-tests/quartz/pom.xml | 37 -------
.../component/quartz/it/QuartzResource.java | 21 ----
.../quarkus/component/quartz/it/QuartzRoutes.java | 13 ---
.../src/main/resources/application.properties | 31 +-----
.../src/main/resources/quartz-node-A.properties | 62 -----------
.../src/main/resources/quartz-node-B.properties | 63 -----------
.../src/main/resources/quartz-node-C.properties | 67 ------------
.../quarkus/component/quartz/it/QuartzTest.java | 31 ------
tooling/scripts/test-categories.yaml | 1 +
tooling/test-list/pom.xml | 1 +
26 files changed, 469 insertions(+), 535 deletions(-)
diff --git a/docs/modules/ROOT/pages/migration-guide/2.11.0.adoc
b/docs/modules/ROOT/pages/migration-guide/2.11.0.adoc
new file mode 100644
index 0000000000..6c247cfdd1
--- /dev/null
+++ b/docs/modules/ROOT/pages/migration-guide/2.11.0.adoc
@@ -0,0 +1,9 @@
+= Camel Quarkus 2.11.0 Migration Guide
+
+The following guide outlines how to adapt your code to changes that were made
in Camel Quarkus 2.11.0 & Quarkus 2.11.0.Final.
+
+== Changes to Quartz clustering support
+
+In previous releases the Camel Quarkus Quartz documention listed various means
of configuring Quartz for clustering. This has now been simplified
+to a single set of instructions that leverages Quarkus Quartz. If you are
using one of the previous methods of clustering, it is advised to update your
+application to the new method documented in the
xref:reference/extensions/quartz.adoc[Quartz extension guide].
diff --git a/docs/modules/ROOT/pages/migration-guide/index.adoc
b/docs/modules/ROOT/pages/migration-guide/index.adoc
index 8786e8b4ba..b064749165 100644
--- a/docs/modules/ROOT/pages/migration-guide/index.adoc
+++ b/docs/modules/ROOT/pages/migration-guide/index.adoc
@@ -4,6 +4,7 @@ We do frequent releases, a release almost every month, and even
though we strive
Listed here are guides on how to migrate between major versions and anything
of significance to watch for when upgrading from minor versions.
+* xref:migration-guide/2.11.0.adoc[Camel Quarkus 2.10.0 to Camel Quarkus
2.11.0 migration guide]
* xref:migration-guide/2.10.0.adoc[Camel Quarkus 2.9.0 to Camel Quarkus 2.10.0
migration guide]
* xref:migration-guide/2.8.0.adoc[Camel Quarkus 2.7.0 to Camel Quarkus 2.8.0
migration guide]
* xref:migration-guide/2.7.0.adoc[Camel Quarkus 2.6.0 to Camel Quarkus 2.7.0
migration guide]
diff --git a/docs/modules/ROOT/pages/reference/extensions/quartz.adoc
b/docs/modules/ROOT/pages/reference/extensions/quartz.adoc
index 9ddb850b18..03a679f665 100644
--- a/docs/modules/ROOT/pages/reference/extensions/quartz.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/quartz.adoc
@@ -43,65 +43,75 @@ Check the xref:user-guide/index.adoc[User guide] for more
information about writ
=== Clustering
-There are two options how to run Quartz in clustered mode:
+Support for Quartz clustering is provided by the Quarkus Quartz extension. The
following steps outline how to configure Quarkus Quartz for use with Camel.
-==== Quarkus based
-
-This is the preferred option. Follow the
https://quarkus.io/guides/quartz[scheduling periodic tasks quartz guide].
-
-- Define database configuration in `application.properties`.
-- Use for example `flyway` to create database tables required for `Quartz`.
-
-===== Quartz based with an Agroal datasource
-
-Follow the
http://www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html#configure-clustering-with-jdbc-jobstore[Configure
Clustering with JDBC-JobStore Guide] with different DS configuration:
-
-- Declare to use `io.quarkus:quarkus-agroal` in `pom.xml` explicitly.
+1. Enable Quartz clustered mode and configure a `DataSource` as a persistence
Quartz job store. An example configuration is as follows.
++
+[source,properties]
+----
+# Quartz configuration
+quarkus.quartz.clustered=true
+quarkus.quartz.store-type=jdbc-cmt
+quarkus.quartz.start-mode=forced
+
+# Datasource configuration
+quarkus.datasource.db-kind=postgresql
+quarkus.datasource.username=quarkus_test
+quarkus.datasource.password=quarkus_test
+quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test
+
+# Optional automatic creation of Quartz tables
+quarkus.flyway.connect-retries=10
+quarkus.flyway.table=flyway_quarkus_history
+quarkus.flyway.migrate-at-start=true
+quarkus.flyway.baseline-on-migrate=true
+quarkus.flyway.baseline-version=1.0
+quarkus.flyway.baseline-description=Quartz
+----
-```
+2. Add the correct JDBC driver extension to your application that corresponds
to the value of `quarkus.datasource.db-kind`. In the above
+example `postgresql` is used, therefore the following JDBC dependency would be
required. Adjust as necessary for your needs. Agroal is also required
+for `DataSource` support.
++
+[source,xml]
+----
+<dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-postgresql</artifactId>
+</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
-```
-
-- Use `quartz.properties` to configure the `JobStore`.
-- Define a datasource via quarkus (see the
https://quarkus.io/guides/datasource[Quarkus datasource documentation)] and use
`CamelQuarkusQuartzConnectionProvider` as the `ConnectionProvider` in
`quartz.properties`:
-
-```
-...
-org.quartz.jobStore.dataSource = myDS
-
-# datasource configuration
-org.quartz.dataSource.myDS.connectionProvider.class =
org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider
-org.quartz.dataSource.myDSB.dataSourceName =
ds_name_if_not_set_default_ds_will_be_used
-```
-
-
-- You can use for example `flyway` to create database tables required for
`Quartz`.
-
-===== Quartz based
-
-You can follow the
http://www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html#configure-clustering-with-jdbc-jobstore[Configure
Clustering with JDBC-JobStore Guide] without any modification:
-
-```
-...
-org.quartz.jobStore.dataSource = myDS
-
-# datasource configuration
-org.quartz.dataSource.myDS.driver = org.postgresql.Driver
-
-# datasource configuration
-org.quartz.dataSource.myDS.URL=jdbc:postgresql://localhost:5432/default
-org.quartz.dataSource.myDS.user = quarkus
-org.quartz.dataSource.myDS.password = quarkus
-```
-
-
-== Camel Quarkus limitations
+----
-=== JDBC Job Store
+3. https://quarkus.io/guides/flyway[Quarkus Flyway] can automatically create
the necessary Quartz database tables for you. Add `quarkus-flyway` to your
application (optional).
++
+[source,xml]
+----
+<dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-flyway</artifactId>
+</dependency>
+----
++
+Also add a Quartz database creation script for your chosen database kind.
+The Quartz project provides ready made scripts that can be copied from
https://github.com/quartz-scheduler/quartz/tree/master/quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore[here].
Add the SQL
+script to `src/main/resources/db/migration/V1.0.0__QuarkusQuartz.sql`. Quarkus
Flyway will detect it on startup and will proceed to create the Quartz database
tables.
+
+4. Configure the Camel Quartz component to use the Quarkus Quartz scheduler.
++
+[source,java]
+----
+@Produces
+@Singleton
+@Named("quartz")
+public QuartzComponent quartzComponent(Scheduler scheduler) {
+ QuartzComponent component = new QuartzComponent();
+ component.setScheduler(scheduler);
+ return component;
+}
+----
-Quartz's property `org.quartz.jobStore.useProperties` is set to `true` and can
not be modified. The value is forced by the Quarkus Quartz extension.
-See the Quartz documentation for more information about
`org.quartz.jobStore.useProperties`.
+Further customization of the Quartz scheduler can be done via various
configuration properties. Refer to to the
https://quarkus.io/guides/quartz#quartz-configuration-reference[Quarkus Quartz
Configuration] guide for more information.
diff --git
a/extensions/quartz/deployment/src/main/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzProcessor.java
b/extensions/quartz/deployment/src/main/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzProcessor.java
index 86d92629b0..2271ea570d 100644
---
a/extensions/quartz/deployment/src/main/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzProcessor.java
+++
b/extensions/quartz/deployment/src/main/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzProcessor.java
@@ -44,7 +44,6 @@ class QuartzProcessor {
"org.quartz.impl.jdbcjobstore.JobStoreSupport",
"org.quartz.impl.triggers.SimpleTriggerImpl",
"org.quartz.impl.triggers.AbstractTrigger",
-
"org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider"
};
private static final DotName SQL_JDBC_DELEGATE =
DotName.createSimple(StdJDBCDelegate.class.getName());
@@ -85,17 +84,15 @@ class QuartzProcessor {
.toArray(String[]::new);
reflectiveClasses.produce(new ReflectiveClassBuildItem(false, true,
delegatesImpl));
-
}
@BuildStep
- void indexSaxonHe(BuildProducer<IndexDependencyBuildItem> deps) {
- deps.produce(new IndexDependencyBuildItem("org.quartz-scheduler",
"quartz"));
+ void indexDependencies(BuildProducer<IndexDependencyBuildItem>
indexedDependency) {
+ indexedDependency.produce(new
IndexDependencyBuildItem("org.quartz-scheduler", "quartz"));
}
@BuildStep
NativeImageSystemPropertyBuildItem disableJMX() {
-
return new
NativeImageSystemPropertyBuildItem("com.mchange.v2.c3p0.management.ManagementCoordinator",
"com.mchange.v2.c3p0.management.NullManagementCoordinator");
}
diff --git a/extensions/quartz/runtime/pom.xml
b/extensions/quartz/runtime/pom.xml
index 4e7a23cff7..41f31b5b93 100644
--- a/extensions/quartz/runtime/pom.xml
+++ b/extensions/quartz/runtime/pom.xml
@@ -53,11 +53,6 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-quartz</artifactId>
</dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-agroal</artifactId>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
diff --git a/extensions/quartz/runtime/src/main/doc/limitations.adoc
b/extensions/quartz/runtime/src/main/doc/limitations.adoc
deleted file mode 100644
index dbff30bac0..0000000000
--- a/extensions/quartz/runtime/src/main/doc/limitations.adoc
+++ /dev/null
@@ -1,4 +0,0 @@
-=== JDBC Job Store
-
-Quartz's property `org.quartz.jobStore.useProperties` is set to `true` and can
not be modified. The value is forced by the Quarkus Quartz extension.
-See the Quartz documentation for more information about
`org.quartz.jobStore.useProperties`.
\ No newline at end of file
diff --git a/extensions/quartz/runtime/src/main/doc/usage.adoc
b/extensions/quartz/runtime/src/main/doc/usage.adoc
index 10f0bb9000..53e12119f7 100644
--- a/extensions/quartz/runtime/src/main/doc/usage.adoc
+++ b/extensions/quartz/runtime/src/main/doc/usage.adoc
@@ -1,55 +1,73 @@
=== Clustering
-There are two options how to run Quartz in clustered mode:
-
-==== Quarkus based
-
-This is the preferred option. Follow the
https://quarkus.io/guides/quartz[scheduling periodic tasks quartz guide].
-
-- Define database configuration in `application.properties`.
-- Use for example `flyway` to create database tables required for `Quartz`.
-
-===== Quartz based with an Agroal datasource
-
-Follow the
http://www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html#configure-clustering-with-jdbc-jobstore[Configure
Clustering with JDBC-JobStore Guide] with different DS configuration:
-
-- Declare to use `io.quarkus:quarkus-agroal` in `pom.xml` explicitly.
-
-```
+Support for Quartz clustering is provided by the Quarkus Quartz extension. The
following steps outline how to configure Quarkus Quartz for use with Camel.
+
+1. Enable Quartz clustered mode and configure a `DataSource` as a persistence
Quartz job store. An example configuration is as follows.
++
+[source,properties]
+----
+# Quartz configuration
+quarkus.quartz.clustered=true
+quarkus.quartz.store-type=jdbc-cmt
+quarkus.quartz.start-mode=forced
+
+# Datasource configuration
+quarkus.datasource.db-kind=postgresql
+quarkus.datasource.username=quarkus_test
+quarkus.datasource.password=quarkus_test
+quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test
+
+# Optional automatic creation of Quartz tables
+quarkus.flyway.connect-retries=10
+quarkus.flyway.table=flyway_quarkus_history
+quarkus.flyway.migrate-at-start=true
+quarkus.flyway.baseline-on-migrate=true
+quarkus.flyway.baseline-version=1.0
+quarkus.flyway.baseline-description=Quartz
+----
+
+2. Add the correct JDBC driver extension to your application that corresponds
to the value of `quarkus.datasource.db-kind`. In the above
+example `postgresql` is used, therefore the following JDBC dependency would be
required. Adjust as necessary for your needs. Agroal is also required
+for `DataSource` support.
++
+[source,xml]
+----
+<dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-jdbc-postgresql</artifactId>
+</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
-```
-
-- Use `quartz.properties` to configure the `JobStore`.
-- Define a datasource via quarkus (see the
https://quarkus.io/guides/datasource[Quarkus datasource documentation)] and use
`CamelQuarkusQuartzConnectionProvider` as the `ConnectionProvider` in
`quartz.properties`:
+----
-```
-...
-org.quartz.jobStore.dataSource = myDS
-
-# datasource configuration
-org.quartz.dataSource.myDS.connectionProvider.class =
org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider
-org.quartz.dataSource.myDSB.dataSourceName =
ds_name_if_not_set_default_ds_will_be_used
-```
-
-
-- You can use for example `flyway` to create database tables required for
`Quartz`.
-
-===== Quartz based
-
-You can follow the
http://www.quartz-scheduler.org/documentation/quartz-1.8.6/configuration/ConfigJDBCJobStoreClustering.html#configure-clustering-with-jdbc-jobstore[Configure
Clustering with JDBC-JobStore Guide] without any modification:
-
-```
-...
-org.quartz.jobStore.dataSource = myDS
-
-# datasource configuration
-org.quartz.dataSource.myDS.driver = org.postgresql.Driver
-
-# datasource configuration
-org.quartz.dataSource.myDS.URL=jdbc:postgresql://localhost:5432/default
-org.quartz.dataSource.myDS.user = quarkus
-org.quartz.dataSource.myDS.password = quarkus
-```
+3. https://quarkus.io/guides/flyway[Quarkus Flyway] can automatically create
the necessary Quartz database tables for you. Add `quarkus-flyway` to your
application (optional).
++
+[source,xml]
+----
+<dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-flyway</artifactId>
+</dependency>
+----
++
+Also add a Quartz database creation script for your chosen database kind.
+The Quartz project provides ready made scripts that can be copied from
https://github.com/quartz-scheduler/quartz/tree/master/quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore[here].
Add the SQL
+script to `src/main/resources/db/migration/V1.0.0__QuarkusQuartz.sql`. Quarkus
Flyway will detect it on startup and will proceed to create the Quartz database
tables.
+
+4. Configure the Camel Quartz component to use the Quarkus Quartz scheduler.
++
+[source,java]
+----
+@Produces
+@Singleton
+@Named("quartz")
+public QuartzComponent quartzComponent(Scheduler scheduler) {
+ QuartzComponent component = new QuartzComponent();
+ component.setScheduler(scheduler);
+ return component;
+}
+----
+
+Further customization of the Quartz scheduler can be done via various
configuration properties. Refer to to the
https://quarkus.io/guides/quartz#quartz-configuration-reference[Quarkus Quartz
Configuration] guide for more information.
diff --git
a/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuarkusQuartzConnectionProvider.java
b/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuarkusQuartzConnectionProvider.java
deleted file mode 100644
index cea123ea1e..0000000000
---
a/extensions/quartz/runtime/src/main/java/org/apache/camel/quarkus/component/quartz/CamelQuarkusQuartzConnectionProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.
- */
-package org.apache.camel.quarkus.component.quartz;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import io.agroal.api.AgroalDataSource;
-import io.quarkus.agroal.DataSource.DataSourceLiteral;
-import io.quarkus.arc.Arc;
-import io.quarkus.arc.ArcContainer;
-import io.quarkus.arc.InstanceHandle;
-import org.quartz.utils.ConnectionProvider;
-
-public class CamelQuarkusQuartzConnectionProvider implements
ConnectionProvider {
- private AgroalDataSource dataSource;
- private String dataSourceName;
-
- @Override
- public Connection getConnection() throws SQLException {
- return dataSource.getConnection();
- }
-
- @Override
- public void shutdown() {
- // Do nothing as the connection will be closed inside the Agroal
extension
- }
-
- @Override
- public void initialize() {
- final ArcContainer container = Arc.container();
- final InstanceHandle<AgroalDataSource> instanceHandle;
- final boolean useDefaultDataSource = dataSourceName == null ||
"".equals(dataSourceName.trim());
- if (useDefaultDataSource) {
- instanceHandle = container.instance(AgroalDataSource.class);
- } else {
- instanceHandle = container.instance(AgroalDataSource.class, new
DataSourceLiteral(dataSourceName));
- }
- if (instanceHandle.isAvailable()) {
- this.dataSource = instanceHandle.get();
- } else {
- String message = String.format(
- "JDBC Store configured but '%s' datasource is missing. You
can configure your datasource by following the guide available at:
https://quarkus.io/guides/datasource",
- useDefaultDataSource ? "default" : dataSourceName);
- throw new IllegalStateException(message);
- }
- }
-
- public void setDataSourceName(String dataSourceName) {
- this.dataSourceName = dataSourceName;
- }
-}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index a0e80c2819..a317931c5a 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -168,6 +168,7 @@
<module>protobuf</module>
<module>pubnub</module>
<module>quartz</module>
+ <module>quartz-clustered</module>
<module>qute</module>
<module>rabbitmq</module>
<module>reactive-streams</module>
diff --git a/integration-tests/quartz/pom.xml
b/integration-tests/quartz-clustered/pom.xml
similarity index 71%
copy from integration-tests/quartz/pom.xml
copy to integration-tests/quartz-clustered/pom.xml
index 9d7972939a..993d26a1ea 100644
--- a/integration-tests/quartz/pom.xml
+++ b/integration-tests/quartz-clustered/pom.xml
@@ -26,39 +26,31 @@
<relativePath>../../poms/build-parent-it/pom.xml</relativePath>
</parent>
- <artifactId>camel-quarkus-integration-test-quartz</artifactId>
- <name>Camel Quarkus :: Integration Tests :: Quartz</name>
- <description>Integration tests for Camel Quarkus Quartz
extension</description>
+ <artifactId>camel-quarkus-integration-test-quartz-clustered</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Quartz Clustered</name>
+ <description>Integration tests for Camel Quarkus Quartz
clustering</description>
+
+ <properties>
+
<quarkus.runner>${project.build.directory}/quarkus-app/quarkus-run.jar</quarkus.runner>
+ </properties>
<dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-cron</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-seda</artifactId>
+ <artifactId>camel-quarkus-microprofile-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy-jackson</artifactId>
- </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jdbc-h2</artifactId>
- </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
@@ -86,13 +78,44 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-test-support</artifactId>
+
<artifactId>camel-quarkus-integration-tests-process-executor-support</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
+ <profile>
+ <id>full</id>
+ <activation>
+ <property>
+ <name>!quickly</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Move surefire:test to integration-test phase to
be able to run java -jar target/*runner.jar from a test -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <phase>integration-test</phase>
+ <configuration>
+ <systemProperties>
+
<quarkus.runner>${quarkus.runner}</quarkus.runner>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>native</id>
<activation>
@@ -102,6 +125,7 @@
</activation>
<properties>
<quarkus.package.type>native</quarkus.package.type>
+
<quarkus.runner>${project.build.directory}/${project.artifactId}-${project.version}-runner</quarkus.runner>
</properties>
<build>
<plugins>
@@ -116,6 +140,11 @@
</goals>
</execution>
</executions>
+ <configuration>
+ <systemProperties>
+
<quarkus.runner>${quarkus.runner}</quarkus.runner>
+ </systemProperties>
+ </configuration>
</plugin>
</plugins>
</build>
@@ -129,19 +158,6 @@
</activation>
<dependencies>
<!-- The following dependencies guarantee that this module is
built after them. You can update them by running `mvn process-resources
-Pformat -N` from the source tree root directory -->
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-cron-deployment</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-quartz-deployment</artifactId>
@@ -157,7 +173,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-seda-deployment</artifactId>
+
<artifactId>camel-quarkus-microprofile-health-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
diff --git
a/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredResource.java
b/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredResource.java
new file mode 100644
index 0000000000..e610e7e4c0
--- /dev/null
+++
b/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredResource.java
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.quartz.it;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.quartz.QuartzComponent;
+import org.quartz.Scheduler;
+
+@Path("/quartz/clustered")
+public class QuartzClusteredResource {
+
+ @Inject
+ CamelContext camelContext;
+
+ @javax.enterprise.inject.Produces
+ @Singleton
+ @Named("quartz")
+ public QuartzComponent quartzComponent(Scheduler scheduler) {
+ QuartzComponent component = new QuartzComponent();
+ component.setScheduler(scheduler);
+ return component;
+ }
+
+ @Path("/start/route")
+ @POST
+ public void startRoute() throws Exception {
+ camelContext.addRoutes(new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("quartz:camel-quarkus/1 * * * *")
+ .log("Hello from {{node.name}}");
+ }
+ });
+ }
+}
diff --git
a/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredRoutes.java
b/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredRoutes.java
new file mode 100644
index 0000000000..51e6e42939
--- /dev/null
+++
b/integration-tests/quartz-clustered/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredRoutes.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.quartz.it;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class QuartzClusteredRoutes extends RouteBuilder {
+ @ConfigProperty(name = "node.name")
+ String nodeName;
+
+ @Override
+ public void configure() {
+ if (nodeName.equals("NodeB")) {
+ from("quartz:camel-quarkus/1 * * * *").routeId("clustered")
+ .log("Hello from {{node.name}}");
+ }
+ }
+}
diff --git
a/integration-tests/quartz-clustered/src/main/resources/application.properties
b/integration-tests/quartz-clustered/src/main/resources/application.properties
new file mode 100644
index 0000000000..520b46a0f1
--- /dev/null
+++
b/integration-tests/quartz-clustered/src/main/resources/application.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+quarkus.banner.enabled = false
+quarkus.log.file.enable = true
+quarkus.log.file.rotation.rotate-on-boot = false
+
+quarkus.quartz.clustered = true
+quarkus.quartz.store-type = jdbc-cmt
+# Must force start since we do not supply any @Scheduled annotated methods
+quarkus.quartz.start-mode = forced
+quarkus.quartz.cluster-checkin-interval=100
+
+# Quartz persistent job store
+quarkus.datasource.devservices.enabled = true
+quarkus.datasource.db-kind = postgresql
+
+# Flyway to create Quartz tables
+quarkus.flyway.connect-retries = 10
+quarkus.flyway.table = flyway_quarkus_history
+quarkus.flyway.migrate-at-start = true
+quarkus.flyway.baseline-on-migrate = true
+quarkus.flyway.baseline-version = 1.0
+quarkus.flyway.baseline-description = Quartz
+
+node.name = NodeA
diff --git
a/integration-tests/quartz/src/main/resources/db/migration/V1.0.1__QuarkusQuartz.sql
b/integration-tests/quartz-clustered/src/main/resources/db/migration/V1.0.1__QuarkusQuartz.sql
similarity index 100%
rename from
integration-tests/quartz/src/main/resources/db/migration/V1.0.1__QuarkusQuartz.sql
rename to
integration-tests/quartz-clustered/src/main/resources/db/migration/V1.0.1__QuarkusQuartz.sql
diff --git
a/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredIT.java
b/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredIT.java
new file mode 100644
index 0000000000..da405a54fb
--- /dev/null
+++
b/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredIT.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.quartz.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class QuartzClusteredIT extends QuartzClusteredTest {
+
+}
diff --git
a/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredTest.java
b/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredTest.java
new file mode 100644
index 0000000000..1f6cdb91b5
--- /dev/null
+++
b/integration-tests/quartz-clustered/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzClusteredTest.java
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.quartz.it;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.apache.camel.quarkus.test.support.process.QuarkusProcessExecutor;
+import org.awaitility.Awaitility;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.zeroturnaround.exec.StartedProcess;
+
+@QuarkusTest
+class QuartzClusteredTest {
+
+ private static final Path QUARKUS_LOG = Paths.get("target/quarkus.log");
+
+ @AfterAll
+ public static void afterAll() {
+ try {
+ Files.deleteIfExists(QUARKUS_LOG);
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+
+ @Test
+ public void clustering() throws IOException {
+ Config config = ConfigProvider.getConfig();
+ String jdbcUrl = config.getValue("quarkus.datasource.jdbc.url",
String.class);
+ String datasourceUsername =
config.getValue("quarkus.datasource.username", String.class);
+ String datasourcePassword =
config.getValue("quarkus.datasource.password", String.class);
+ Path quarkusLog = Paths.get("target/quarkus.log");
+
+ // Start secondary application process
+ QuarkusProcessExecutor quarkusProcessExecutor = new
QuarkusProcessExecutor(
+ "-Dnode.name=NodeB",
+ "-Dnode.autostart=true",
+ "-Dquarkus.log.file.path=" + QUARKUS_LOG,
+ "-Dquarkus.datasource.jdbc.url=" + jdbcUrl,
+ "-Dquarkus.datasource.username=" + datasourceUsername,
+ "-Dquarkus.datasource.password=" + datasourcePassword,
+ "-Dquarkus.flyway.migrate-at-start=false");
+ StartedProcess process = quarkusProcessExecutor.start();
+
+ // Wait until the process is fully initialized
+ awaitStartup(quarkusProcessExecutor);
+
+ try {
+ // Start the scheduler in this app and join the cluster
+ RestAssured.given()
+ .post("/quartz/clustered/start/route")
+ .then()
+ .statusCode(204);
+
+ // Verify that the NodeB scheduler is running
+ Awaitility.await().atMost(10, TimeUnit.SECONDS).with().until(() ->
{
+ return Files.readAllLines(quarkusLog).stream().anyMatch(line
-> line.contains("Hello from NodeB"));
+ });
+
+ // Verify there is no mention of NodeA in the logs since NodeB is
currently the 'leader'
+ Assertions.assertFalse(
+ Files.readAllLines(quarkusLog).stream().anyMatch(line ->
line.contains("Hello from NodeA")));
+
+ // Stop NodeB to trigger failover to NodeA
+ process.getProcess().destroy();
+
+ // Verify failover
+ Awaitility.await().atMost(1, TimeUnit.MINUTES).until(() -> {
+ return Files.readAllLines(quarkusLog).stream().anyMatch(line
-> line.contains("Hello from NodeA"));
+ });
+ } finally {
+ if (process != null && process.getProcess().isAlive()) {
+ process.getProcess().destroy();
+ }
+ }
+ }
+
+ private void awaitStartup(QuarkusProcessExecutor quarkusProcessExecutor) {
+ Awaitility.await().atMost(30, TimeUnit.SECONDS).pollDelay(1,
TimeUnit.SECONDS).until(() -> {
+ return isApplicationHealthy(quarkusProcessExecutor.getHttpPort());
+ });
+ }
+
+ private boolean isApplicationHealthy(int port) {
+ try {
+ int status = RestAssured.given()
+ .port(port)
+ .get("/q/health")
+ .then()
+ .extract()
+ .statusCode();
+ return status == 200;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+}
diff --git a/integration-tests/quartz/pom.xml b/integration-tests/quartz/pom.xml
index 9d7972939a..fce0ce3543 100644
--- a/integration-tests/quartz/pom.xml
+++ b/integration-tests/quartz/pom.xml
@@ -51,22 +51,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jdbc-postgresql</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-jdbc-h2</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-agroal</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-flyway</artifactId>
- </dependency>
<!-- test dependencies -->
<dependency>
@@ -79,16 +63,6 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-integration-test-support</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
@@ -170,17 +144,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <id>skip-testcontainers-tests</id>
- <activation>
- <property>
- <name>skip-testcontainers-tests</name>
- </property>
- </activation>
- <properties>
- <skipTests>true</skipTests>
- </properties>
- </profile>
</profiles>
</project>
diff --git
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
index f0e6c1960b..cf857db720 100644
---
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
+++
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
@@ -51,27 +51,6 @@ public class QuartzResource {
return new QuartzComponent();
}
- @javax.enterprise.inject.Produces
- @Singleton
- @Named("quartzNodeA")
- public QuartzComponent createQuartzNodeA() {
- return new QuartzComponent();
- }
-
- @javax.enterprise.inject.Produces
- @Singleton
- @Named("quartzNodeB")
- public QuartzComponent createQuartzNodeB() {
- return new QuartzComponent();
- }
-
- @javax.enterprise.inject.Produces
- @Singleton
- @Named("quartzNodeC")
- public QuartzComponent createQuartzNodeC() {
- return new QuartzComponent();
- }
-
@Path("/getNameAndResult")
@GET
@Produces(MediaType.APPLICATION_JSON)
diff --git
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzRoutes.java
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzRoutes.java
index 2b1a42722d..6bfa96b4d1 100644
---
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzRoutes.java
+++
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzRoutes.java
@@ -42,18 +42,5 @@ public class QuartzRoutes extends RouteBuilder {
from("quartz://misfire?cron=0/1+*+*+*+*+?&trigger.timeZone=Europe/Stockholm&trigger.misfireInstruction=2")
.to("seda:quartz-cron-misfire-result");
-
- from("quartzNodeA:nodeA/1 * * * * ")
- .setBody(constant("Hello Camel Quarkus Quartz NodeA"))
- .to("seda:quartz-nodeA-result");
-
- from("quartzNodeB:nodeB/1 * * * * ")
- .setBody(constant("Hello Camel Quarkus Quartz NodeB"))
- .to("seda:quartz-nodeB-result");
-
- from("quartzNodeC:nodeC/1 * * * * ")
- .setBody(constant("Hello Camel Quarkus Quartz NodeC"))
- .to("seda:quartz-nodeC-result");
-
}
}
diff --git a/integration-tests/quartz/src/main/resources/application.properties
b/integration-tests/quartz/src/main/resources/application.properties
index 0805de0517..faa87b4b4e 100644
--- a/integration-tests/quartz/src/main/resources/application.properties
+++ b/integration-tests/quartz/src/main/resources/application.properties
@@ -15,33 +15,6 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-camel.component.quartzNodeA.propertiesFile=quartz-node-A.properties
-camel.component.quartzNodeB.propertiesFile=quartz-node-B.properties
-camel.component.quartzFromProperties.propertiesFile=quartz.properties
+camel.component.quartzFromProperties.propertiesFile = quartz.properties
-quarkus.native.resources.includes = quartz*.properties
-
-quarkus.datasource.devservices.enabled = true
-
-#postgresql db
-quarkus.datasource.db-kind=postgresql
-# flyway to create Quartz tables
-quarkus.flyway.connect-retries=10
-quarkus.flyway.table=flyway_quarkus_history
-quarkus.flyway.migrate-at-start=true
-quarkus.flyway.baseline-on-migrate=true
-quarkus.flyway.baseline-version=1.0
-quarkus.flyway.baseline-description=Quartz
-
-# h2 db
-quarkus.datasource.h2ds.db-kind=h2
-# flyway to create Quartz tables
-quarkus.flyway.h2ds.connect-retries=10
-quarkus.flyway.h2ds.table=flyway_quarkus_history
-quarkus.flyway.h2ds.migrate-at-start=true
-quarkus.flyway.h2ds.baseline-on-migrate=true
-quarkus.flyway.h2ds.baseline-version=1.0
-quarkus.flyway.h2ds.baseline-description=Quartz
-
-#fixed port is required to use quarz.properties for DS configuration
-quarkus.datasource.devservices.port = 5432
\ No newline at end of file
+quarkus.native.resources.includes = quartz.properties
diff --git
a/integration-tests/quartz/src/main/resources/quartz-node-A.properties
b/integration-tests/quartz/src/main/resources/quartz-node-A.properties
deleted file mode 100644
index 3c54402c53..0000000000
--- a/integration-tests/quartz/src/main/resources/quartz-node-A.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#============================================================================
-# Configure Main Scheduler Properties
-#============================================================================
-
-org.quartz.jdbc.initialize-schema=always
-org.quartz.scheduler.instanceName = NodeA
-org.quartz.scheduler.instanceId = AUTO
-
-#============================================================================
-# Configure ThreadPool
-#============================================================================
-
-org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount = 25
-org.quartz.threadPool.threadPriority = 5
-
-#============================================================================
-# Configure JobStore
-#============================================================================
-
-org.quartz.jobStore.misfireThreshold = 60000
-
-org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
-org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
-org.quartz.jobStore.useProperties = true
-org.quartz.jobStore.dataSource = myDSA
-org.quartz.jobStore.tablePrefix = QRTZ_
-
-org.quartz.jobStore.isClustered = true
-org.quartz.jobStore.clusterCheckinInterval = 500
-
-
-#============================================================================
-# Configure Datasources
-#============================================================================
-
-# datasource configuration
-org.quartz.dataSource.myDSA.connectionProvider.class =
org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider
-
-#
-#============================================================================
-# Disable JMX
-#============================================================================
-
-#com.mchange.v2.c3p0.management.ManagementCoordinator =
com.mchange.v2.c3p0.management.NullManagementCoordinator
\ No newline at end of file
diff --git
a/integration-tests/quartz/src/main/resources/quartz-node-B.properties
b/integration-tests/quartz/src/main/resources/quartz-node-B.properties
deleted file mode 100644
index 210acdd676..0000000000
--- a/integration-tests/quartz/src/main/resources/quartz-node-B.properties
+++ /dev/null
@@ -1,63 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#============================================================================
-# Configure Main Scheduler Properties
-#============================================================================
-
-org.quartz.jdbc.initialize-schema=always
-org.quartz.scheduler.instanceName = NodeB
-org.quartz.scheduler.instanceId = AUTO
-
-#============================================================================
-# Configure ThreadPool
-#============================================================================
-
-org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount = 25
-org.quartz.threadPool.threadPriority = 5
-
-#============================================================================
-# Configure JobStore
-#============================================================================
-
-org.quartz.jobStore.misfireThreshold = 60000
-
-org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
-org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
-org.quartz.jobStore.useProperties = true
-org.quartz.jobStore.dataSource = myDSB
-org.quartz.jobStore.tablePrefix = QRTZ_
-
-org.quartz.jobStore.isClustered = true
-org.quartz.jobStore.clusterCheckinInterval = 500
-
-
-#============================================================================
-# Configure Datasources
-#============================================================================
-
-# datasource configuration
-org.quartz.dataSource.myDSB.connectionProvider.class =
org.apache.camel.quarkus.component.quartz.CamelQuarkusQuartzConnectionProvider
-org.quartz.dataSource.myDSB.dataSourceName = h2ds
-
-#
-#============================================================================
-# Disable JMX
-#============================================================================
-
-#com.mchange.v2.c3p0.management.ManagementCoordinator =
com.mchange.v2.c3p0.management.NullManagementCoordinator
\ No newline at end of file
diff --git
a/integration-tests/quartz/src/main/resources/quartz-node-C.properties
b/integration-tests/quartz/src/main/resources/quartz-node-C.properties
deleted file mode 100644
index 11c2432ac7..0000000000
--- a/integration-tests/quartz/src/main/resources/quartz-node-C.properties
+++ /dev/null
@@ -1,67 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-
-#============================================================================
-# Configure Main Scheduler Properties
-#============================================================================
-
-org.quartz.jdbc.initialize-schema=always
-org.quartz.scheduler.instanceName = NodeB
-org.quartz.scheduler.instanceId = AUTO
-
-#============================================================================
-# Configure ThreadPool
-#============================================================================
-
-org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount = 25
-org.quartz.threadPool.threadPriority = 5
-
-#============================================================================
-# Configure JobStore
-#============================================================================
-
-org.quartz.jobStore.misfireThreshold = 60000
-
-org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
-org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
-org.quartz.jobStore.useProperties = true
-org.quartz.jobStore.dataSource = myDSC
-org.quartz.jobStore.tablePrefix = QRTZ_
-
-org.quartz.jobStore.isClustered = true
-org.quartz.jobStore.clusterCheckinInterval = 500
-
-
-#============================================================================
-# Configure Datasources
-#============================================================================
-
-# datasource configuration
-org.quartz.dataSource.myDSC.driver = org.postgresql.Driver
-
-# datasource configuration
-org.quartz.dataSource.myDSC.URL=jdbc:postgresql://localhost:5432/default
-org.quartz.dataSource.myDSC.user = quarkus
-org.quartz.dataSource.myDSC.password = quarkus
-
-#
-#============================================================================
-# Disable JMX
-#============================================================================
-
-#com.mchange.v2.c3p0.management.ManagementCoordinator =
com.mchange.v2.c3p0.management.NullManagementCoordinator
\ No newline at end of file
diff --git
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzTest.java
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzTest.java
index c55252dd58..5713d00743 100644
---
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzTest.java
+++
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzTest.java
@@ -81,35 +81,4 @@ class QuartzTest {
.body("timezone", is("Europe/Stockholm"),
"misfire", is("2"));
}
-
- @Test
- public void testClustered() throws InterruptedException {
- RestAssured.given()
- .queryParam("fromEndpoint", "quartz-nodeA")
- .get("/quartz/get")
- .then()
- .statusCode(200)
- .body(is("Hello Camel Quarkus Quartz NodeA"));
- }
-
- @Test
- public void testClusteredWithNamedDS() throws InterruptedException {
- RestAssured.given()
- .queryParam("fromEndpoint", "quartz-nodeB")
- .get("/quartz/get")
- .then()
- .statusCode(200)
- .body(is("Hello Camel Quarkus Quartz NodeB"));
- }
-
- @Test
- public void testClusteredWithoutDS() throws InterruptedException {
- //NodeB uses h2 db, which is not initialized therefore no message will
be received
- RestAssured.given()
- .queryParam("fromEndpoint", "quartz-nodeC")
- .get("/quartz/get")
- .then()
- .statusCode(200)
- .body(is("Hello Camel Quarkus Quartz NodeC"));
- }
}
diff --git a/tooling/scripts/test-categories.yaml
b/tooling/scripts/test-categories.yaml
index 81b15fed1d..cc50603575 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -177,6 +177,7 @@ group-11:
group-12:
- aws2-grouped
- csimple
+ - quartz-clustered
- microprofile
- openapi-java
- opentracing
diff --git a/tooling/test-list/pom.xml b/tooling/test-list/pom.xml
index 129162070e..feccd33246 100644
--- a/tooling/test-list/pom.xml
+++ b/tooling/test-list/pom.xml
@@ -61,6 +61,7 @@
<exclude>main-unknown-args-fail/pom.xml</exclude>
<exclude>main-unknown-args-ignore/pom.xml</exclude>
<exclude>messaging/pom.xml</exclude>
+ <exclude>quartz-clustered/pom.xml</exclude>
</excludes>
</fileSet>
</fileSets>