From 4efa89c3dc5d4dfcdce5831f44582c21d8132e95 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 25 Nov 2024 16:12:15 +0100 Subject: [PATCH 1/2] SQL Kamelets: Disable autowiring by default - Oracle Source Signed-off-by: Andrea Cosentino --- kamelets/oracle-database-source.kamelet.yaml | 6 +++++- .../resources/kamelets/oracle-database-source.kamelet.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kamelets/oracle-database-source.kamelet.yaml b/kamelets/oracle-database-source.kamelet.yaml index c3eb1738e..b3380ea3c 100644 --- a/kamelets/oracle-database-source.kamelet.yaml +++ b/kamelets/oracle-database-source.kamelet.yaml @@ -91,6 +91,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-oracle-source + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -99,7 +103,7 @@ spec: url: 'jdbc:oracle:thin:@{{serverName}}:{{serverPort}}/{{databaseName}}' driverClassName: 'oracle.jdbc.driver.OracleDriver' from: - uri: "sql:{{query}}" + uri: "{{local-sql-oracle-source}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" onConsume: "{{?consumedQuery}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-source.kamelet.yaml index c3eb1738e..b3380ea3c 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-source.kamelet.yaml @@ -91,6 +91,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-oracle-source + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -99,7 +103,7 @@ spec: url: 'jdbc:oracle:thin:@{{serverName}}:{{serverPort}}/{{databaseName}}' driverClassName: 'oracle.jdbc.driver.OracleDriver' from: - uri: "sql:{{query}}" + uri: "{{local-sql-oracle-source}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" onConsume: "{{?consumedQuery}}" From bd77b0083681a90c81ab9866208724e0bd253bac Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 25 Nov 2024 16:14:05 +0100 Subject: [PATCH 2/2] SQL Kamelets: Disable autowiring by default - Oracle Sink Signed-off-by: Andrea Cosentino --- kamelets/oracle-database-sink.kamelet.yaml | 6 +++++- .../resources/kamelets/oracle-database-sink.kamelet.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kamelets/oracle-database-sink.kamelet.yaml b/kamelets/oracle-database-sink.kamelet.yaml index 30954fb12..ef8d3151a 100644 --- a/kamelets/oracle-database-sink.kamelet.yaml +++ b/kamelets/oracle-database-sink.kamelet.yaml @@ -94,6 +94,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-oracle-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -108,6 +112,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sql-oracle-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml index 30954fb12..ef8d3151a 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml @@ -94,6 +94,10 @@ spec: - "mvn:org.apache.commons:commons-dbcp2:2.12.0" template: beans: + - name: local-sql-oracle-sink + type: "#class:org.apache.camel.component.sql.SqlComponent" + properties: + autowiredEnabled: "false" - name: dsBean type: "#class:org.apache.commons.dbcp2.BasicDataSource" properties: @@ -108,6 +112,6 @@ spec: json: library: Jackson - to: - uri: "sql:{{query}}" + uri: "{{local-sql-oracle-sink}}:{{query}}" parameters: dataSource: "#bean:{{dsBean}}"