camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/8] git commit: CAMEL-6407: Include message history in stacktraces from error handler, making it easier to know where the problem was. Work in progress.
Date Mon, 03 Jun 2013 06:20:19 GMT
Updated Branches:
  refs/heads/camel-2.10.x e10eecf91 -> f3de135d8
  refs/heads/camel-2.11.x afb28228a -> 4ebb646f3
  refs/heads/master ddf7ba9b9 -> f55cf593d


CAMEL-6407: Include message history in stacktraces from error handler, making it easier to
know where the problem was. Work in progress.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c04cce0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c04cce0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c04cce0

Branch: refs/heads/master
Commit: 6c04cce00e206d3f2396ca1545e43328ee72693e
Parents: ddf7ba9
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jun 2 17:31:21 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jun 2 17:31:21 2013 +0200

----------------------------------------------------------------------
 .../management/mbean/ManagedCamelContextMBean.java |    3 +++
 .../api/management/mbean/ManagedRouteMBean.java    |    3 +++
 .../management/mbean/ManagedCamelContext.java      |    4 ++++
 .../camel/management/mbean/ManagedRoute.java       |    4 ++++
 .../camel/management/ManagedCamelContextTest.java  |    3 +++
 5 files changed, 17 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6c04cce0/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
index 829eede..4af6d3d 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
@@ -70,6 +70,9 @@ public interface ManagedCamelContextMBean extends ManagedPerformanceCounterMBean
     @ManagedAttribute(description = "Tracing")
     void setTracing(Boolean tracing);
 
+    @ManagedAttribute(description = "Message History")
+    Boolean getMessageHistory();
+
     @ManagedAttribute(description = "Current number of inflight Exchanges")
     Integer getInflightExchanges();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6c04cce0/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
index 898691a..d498718 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
@@ -45,6 +45,9 @@ public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean
{
     @ManagedAttribute(description = "Tracing")
     void setTracing(Boolean tracing);
 
+    @ManagedAttribute(description = "Message History")
+    Boolean getMessageHistory();
+
     @ManagedAttribute(description = "Route Policy List")
     String getRoutePolicyList();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6c04cce0/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index 4229965..2f5a76e 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -109,6 +109,10 @@ public class ManagedCamelContext extends ManagedPerformanceCounter implements
Ti
         context.setTracing(tracing);
     }
 
+    public Boolean getMessageHistory() {
+        return context.isMessageHistory();
+    }
+
     public Integer getInflightExchanges() {
         return context.getInflightRepository().size();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/6c04cce0/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index 3c612d1..768b631 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -114,6 +114,10 @@ public class ManagedRoute extends ManagedPerformanceCounter implements
TimerList
         route.getRouteContext().setTracing(tracing);
     }
 
+    public Boolean getMessageHistory() {
+        return route.getRouteContext().isMessageHistory();
+    }
+
     public String getRoutePolicyList() {
         List<RoutePolicy> policyList = route.getRouteContext().getRoutePolicyList();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/6c04cce0/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
index 417d7c9..7f1aa9c 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
@@ -57,6 +57,9 @@ public class ManagedCamelContextTest extends ManagementTestSupport {
         String status = (String) mbeanServer.getAttribute(on, "State");
         assertEquals("Started", status);
 
+        Boolean messageHistory = (Boolean) mbeanServer.getAttribute(on, "MessageHistory");
+        assertEquals(Boolean.TRUE, messageHistory);
+
         // invoke operations
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World");


Mime
View raw message