camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/4] git commit: CAMEL-6384: Added BacklogDebugger MBean for live debugging of Camel routes.
Date Tue, 04 Jun 2013 09:00:25 GMT
Updated Branches:
  refs/heads/camel-2.11.x b739a43cf -> fffddef38
  refs/heads/master fdd1f5bdf -> b22ac5c55


CAMEL-6384: Added BacklogDebugger MBean for live debugging of Camel routes.


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

Branch: refs/heads/master
Commit: f5e6bbbaaf878f11050bcdfa9639a5a7fc0551e1
Parents: fdd1f5b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Jun 4 10:56:57 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Jun 4 10:56:57 2013 +0200

----------------------------------------------------------------------
 .../mbean/ManagedBacklogDebuggerMBean.java         |    5 ++++-
 .../management/mbean/ManagedBacklogDebugger.java   |    4 ++++
 .../processor/interceptor/BacklogDebugger.java     |   10 ++++++++++
 3 files changed, 18 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f5e6bbba/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedBacklogDebuggerMBean.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedBacklogDebuggerMBean.java
b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedBacklogDebuggerMBean.java
index 1df2e2c..02d2d96 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedBacklogDebuggerMBean.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedBacklogDebuggerMBean.java
@@ -44,9 +44,12 @@ public interface ManagedBacklogDebuggerMBean {
     @ManagedOperation(description = "Add a conditional breakpoint at the given node id")
     void addConditionalBreakpoint(String nodeId, String language, String predicate);
 
-    @ManagedOperation(description = "Remote the breakpoint from the given node id")
+    @ManagedOperation(description = "Remote the breakpoint from the given node id (will resume
suspend breakpoint first)")
     void removeBreakpoint(String nodeId);
 
+    @ManagedOperation(description = "Remote all breakpoints (will resume all suspend breakpoints
first and exists single step mode)")
+    void removeAllBreakpoints();
+
     @ManagedOperation(description = "Resume running from the suspended breakpoint at the
given node id")
     void resumeBreakpoint(String nodeId);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f5e6bbba/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBacklogDebugger.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBacklogDebugger.java
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBacklogDebugger.java
index 444e35d..eadedd7 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBacklogDebugger.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBacklogDebugger.java
@@ -80,6 +80,10 @@ public class ManagedBacklogDebugger implements ManagedBacklogDebuggerMBean
{
         backlogDebugger.removeBreakpoint(nodeId);
     }
 
+    public void removeAllBreakpoints() {
+        backlogDebugger.removeAllBreakpoints();
+    }
+
     public Set<String> getBreakpoints() {
         return backlogDebugger.getBreakpoints();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5e6bbba/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogDebugger.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogDebugger.java
b/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogDebugger.java
index b243968..c5f8337 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogDebugger.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/BacklogDebugger.java
@@ -39,6 +39,7 @@ import org.apache.camel.impl.DefaultDebugger;
 import org.apache.camel.management.event.ExchangeCompletedEvent;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.ProcessorDefinitionHelper;
+import org.apache.camel.spi.Breakpoint;
 import org.apache.camel.spi.Condition;
 import org.apache.camel.spi.Debugger;
 import org.apache.camel.spi.InterceptStrategy;
@@ -233,6 +234,15 @@ public class BacklogDebugger extends ServiceSupport implements InterceptStrategy
         }
     }
 
+    public void removeAllBreakpoints() {
+        // stop single stepping
+        singleStepExchangeId = null;
+
+        for (String nodeId : getSuspendedBreakpointNodeIds()) {
+            removeBreakpoint(nodeId);
+        }
+    }
+
     public Set<String> getBreakpoints() {
         return new LinkedHashSet<String>(breakpoints.keySet());
     }


Mime
View raw message