You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/27 08:51:03 UTC

[camel] branch main updated (7d6f7da -> 9cf70a7)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 7d6f7da  Fixed NPE
     new 3de91cd  Do not use deprecate
     new 9cf70a7  camel-management - counters on mbeans should not throw exception

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../api/management/mbean/ManagedCounterMBean.java  |  2 +-
 .../mbean/ManagedPerformanceCounterMBean.java      | 24 +++++++++++-----------
 .../camel/management/mbean/ManagedCounter.java     |  2 +-
 .../mbean/ManagedPerformanceCounter.java           | 22 ++++++++++----------
 .../org/apache/camel/main/VertxHttpServer.java     |  5 +++--
 5 files changed, 28 insertions(+), 27 deletions(-)

[camel] 02/02: camel-management - counters on mbeans should not throw exception

Posted by da...@apache.org.
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

commit 9cf70a781338c16319678ca6090f0aa36b23a1fc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 26 12:33:31 2021 +0100

    camel-management - counters on mbeans should not throw exception
---
 .../api/management/mbean/ManagedCounterMBean.java  |  2 +-
 .../mbean/ManagedPerformanceCounterMBean.java      | 24 +++++++++++-----------
 .../camel/management/mbean/ManagedCounter.java     |  2 +-
 .../mbean/ManagedPerformanceCounter.java           | 22 ++++++++++----------
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
index 01c85f9..21b7544 100644
--- a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
+++ b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCounterMBean.java
@@ -33,6 +33,6 @@ public interface ManagedCounterMBean {
     Date getResetTimestamp();
 
     @ManagedAttribute(description = "Total number of exchanges")
-    long getExchangesTotal() throws Exception;
+    long getExchangesTotal();
 
 }
diff --git a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
index 745e790..0220a14 100644
--- a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
+++ b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
@@ -24,40 +24,40 @@ import org.apache.camel.api.management.ManagedOperation;
 public interface ManagedPerformanceCounterMBean extends ManagedCounterMBean {
 
     @ManagedAttribute(description = "Number of completed exchanges")
-    long getExchangesCompleted() throws Exception;
+    long getExchangesCompleted();
 
     @ManagedAttribute(description = "Number of failed exchanges")
-    long getExchangesFailed() throws Exception;
+    long getExchangesFailed();
 
     @ManagedAttribute(description = "Number of inflight exchanges")
-    long getExchangesInflight() throws Exception;
+    long getExchangesInflight();
 
     @ManagedAttribute(description = "Number of failures handled")
-    long getFailuresHandled() throws Exception;
+    long getFailuresHandled();
 
     @ManagedAttribute(description = "Number of redeliveries (internal only)")
-    long getRedeliveries() throws Exception;
+    long getRedeliveries();
 
     @ManagedAttribute(description = "Number of external initiated redeliveries (such as from JMS broker)")
-    long getExternalRedeliveries() throws Exception;
+    long getExternalRedeliveries();
 
     @ManagedAttribute(description = "Min Processing Time [milliseconds]")
-    long getMinProcessingTime() throws Exception;
+    long getMinProcessingTime();
 
     @ManagedAttribute(description = "Mean Processing Time [milliseconds]")
-    long getMeanProcessingTime() throws Exception;
+    long getMeanProcessingTime();
 
     @ManagedAttribute(description = "Max Processing Time [milliseconds]")
-    long getMaxProcessingTime() throws Exception;
+    long getMaxProcessingTime();
 
     @ManagedAttribute(description = "Total Processing Time [milliseconds]")
-    long getTotalProcessingTime() throws Exception;
+    long getTotalProcessingTime();
 
     @ManagedAttribute(description = "Last Processing Time [milliseconds]")
-    long getLastProcessingTime() throws Exception;
+    long getLastProcessingTime();
 
     @ManagedAttribute(description = "Delta Processing Time [milliseconds]")
-    long getDeltaProcessingTime() throws Exception;
+    long getDeltaProcessingTime();
 
     @ManagedAttribute(description = "Last Exchange Completed Timestamp")
     Date getLastExchangeCompletedTimestamp();
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
index 2aff01f..a91019c 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCounter.java
@@ -52,7 +52,7 @@ public abstract class ManagedCounter implements ManagedCounterMBean {
     }
 
     @Override
-    public long getExchangesTotal() throws Exception {
+    public long getExchangesTotal() {
         return exchangesTotal.getValue();
     }
 
diff --git a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
index 46d9e55..c2d997b 100644
--- a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
+++ b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
@@ -104,12 +104,12 @@ public abstract class ManagedPerformanceCounter extends ManagedCounter
     }
 
     @Override
-    public long getExchangesCompleted() throws Exception {
+    public long getExchangesCompleted() {
         return exchangesCompleted.getValue();
     }
 
     @Override
-    public long getExchangesFailed() throws Exception {
+    public long getExchangesFailed() {
         return exchangesFailed.getValue();
     }
 
@@ -119,47 +119,47 @@ public abstract class ManagedPerformanceCounter extends ManagedCounter
     }
 
     @Override
-    public long getFailuresHandled() throws Exception {
+    public long getFailuresHandled() {
         return failuresHandled.getValue();
     }
 
     @Override
-    public long getRedeliveries() throws Exception {
+    public long getRedeliveries() {
         return redeliveries.getValue();
     }
 
     @Override
-    public long getExternalRedeliveries() throws Exception {
+    public long getExternalRedeliveries() {
         return externalRedeliveries.getValue();
     }
 
     @Override
-    public long getMinProcessingTime() throws Exception {
+    public long getMinProcessingTime() {
         return minProcessingTime.getValue();
     }
 
     @Override
-    public long getMeanProcessingTime() throws Exception {
+    public long getMeanProcessingTime() {
         return meanProcessingTime.getValue();
     }
 
     @Override
-    public long getMaxProcessingTime() throws Exception {
+    public long getMaxProcessingTime() {
         return maxProcessingTime.getValue();
     }
 
     @Override
-    public long getTotalProcessingTime() throws Exception {
+    public long getTotalProcessingTime() {
         return totalProcessingTime.getValue();
     }
 
     @Override
-    public long getLastProcessingTime() throws Exception {
+    public long getLastProcessingTime() {
         return lastProcessingTime.getValue();
     }
 
     @Override
-    public long getDeltaProcessingTime() throws Exception {
+    public long getDeltaProcessingTime() {
         return deltaProcessingTime.getValue();
     }
 

[camel] 01/02: Do not use deprecate

Posted by da...@apache.org.
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

commit 3de91cd23b1f9e5bb42306f344ee51544b7d5904
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 26 11:37:47 2021 +0100

    Do not use deprecate
---
 .../src/main/java/org/apache/camel/main/VertxHttpServer.java         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java
index 99d0295..6aaf136 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java
@@ -23,10 +23,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Component;
+import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.StartupListener;
 import org.apache.camel.spi.CamelEvent;
-import org.apache.camel.support.IntrospectionSupport;
 import org.apache.camel.support.ObjectHelper;
 import org.apache.camel.support.SimpleEventNotifierSupport;
 import org.apache.camel.util.ReflectionHelper;
@@ -64,7 +64,8 @@ public final class VertxHttpServer {
                     .resolveMandatoryClass(
                             "org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration");
             Object config = clazz.getConstructors()[0].newInstance();
-            IntrospectionSupport.setProperty(camelContext, config, "port", port);
+            camelContext.adapt(ExtendedCamelContext.class).getBeanIntrospection()
+                    .setProperty(camelContext, config, "port", port);
 
             clazz = camelContext.getClassResolver()
                     .resolveMandatoryClass(