This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e3dd702d492 Polished
e3dd702d492 is described below
commit e3dd702d4923c67070f37bd3e4f5bb6cfbf97b6c
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Nov 5 11:33:00 2022 +0100
Polished
---
camel-dependencies/pom.xml | 2 +-
components/camel-plc4x/pom.xml | 26 +++++++++++-----------
.../camel/component/plc4x/Plc4XEndpoint.java | 14 +++---------
parent/pom.xml | 2 +-
4 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 0d88165b283..8b71caaac2e 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -451,7 +451,7 @@
<pgjdbc-driver-version>42.4.1</pgjdbc-driver-version>
<pgjdbc-ng-driver-version>0.8.9</pgjdbc-ng-driver-version>
<picocli-version>4.6.3</picocli-version>
- <plc4x.version>0.10.0</plc4x.version>
+ <plc4x-version>0.10.0</plc4x-version>
<powermock-version>2.0.7</powermock-version>
<properties-maven-plugin-version>1.0-alpha-2</properties-maven-plugin-version>
<protobuf-maven-plugin-version>0.6.1</protobuf-maven-plugin-version>
diff --git a/components/camel-plc4x/pom.xml b/components/camel-plc4x/pom.xml
index 3369ee6004d..02aaba77fee 100644
--- a/components/camel-plc4x/pom.xml
+++ b/components/camel-plc4x/pom.xml
@@ -42,17 +42,17 @@
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-api</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-connection-pool</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-scraper</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
@@ -65,7 +65,7 @@
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-ab-eth</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
@@ -81,55 +81,55 @@
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-ads</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-canopen</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-eip</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-firmata</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-knxnetip</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-modbus</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-opcua</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-s7</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-simulated</artifactId>
- <version>${plc4x.version}</version>
+ <version>${plc4x-version}</version>
<scope>runtime</scope>
</dependency>
diff --git
a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
index 2fcb95d44a9..9883ccd4831 100644
---
a/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
+++
b/components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XEndpoint.java
@@ -99,11 +99,6 @@ public class Plc4XEndpoint extends DefaultEndpoint {
return connection;
}
- @Override
- public void setProperties(Object bean, Map<String, Object> parameters) {
-
- }
-
@Override
public Producer createProducer() throws Exception {
//Checking if connection is still up and reconnecting if not
@@ -119,12 +114,9 @@ public class Plc4XEndpoint extends DefaultEndpoint {
if (!connection.isConnected()) {
connection =
plcDriverManager.getConnection(uri.replaceFirst("plc4x:/?/?", ""));
}
- return new Plc4XConsumer(this, processor);
- }
-
- @Override
- public boolean isSingleton() {
- return true;
+ Plc4XConsumer consumer = new Plc4XConsumer(this, processor);
+ configureConsumer(consumer);
+ return consumer;
}
public PlcDriverManager getPlcDriverManager() {
diff --git a/parent/pom.xml b/parent/pom.xml
index 298b9f9b7a9..eb1aec4ed4c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -437,7 +437,7 @@
<pgjdbc-driver-version>42.4.1</pgjdbc-driver-version>
<pgjdbc-ng-driver-version>0.8.9</pgjdbc-ng-driver-version>
<picocli-version>4.6.3</picocli-version>
- <plc4x.version>0.10.0</plc4x.version>
+ <plc4x-version>0.10.0</plc4x-version>
<powermock-version>2.0.7</powermock-version>
<properties-maven-plugin-version>1.0-alpha-2</properties-maven-plugin-version>
<protobuf-version>3.19.6</protobuf-version>