Debugger InterceptStrategy

View: New views
2 Messages — Rating Filter:   Alert me  

Debugger InterceptStrategy

by RobMMS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I wanted to test the Debugger in my route and tried to add it as an InterceptStrategy, so that I can inspect the nodes in my route. I've done the following:

       
// create a simple route and hang in the debugger
cc.addRoutes(new RouteBuilder() {
        public void configure() throws Exception {
       
          // add a debugger interceptor
          getContext().addInterceptStrategy(new Debugger());

          from("direct:start").process(mp).to("direct:end");
                               
        }
});

//send a test message
pt.sendBody("direct:start", "DebuggerTest");
               
//get the Debugger
debugger=Debugger.getDebugger(cc);
               
//get the Exchanges-List of node "direct:start"
List<Exchange> list = debugger.getExchanges("direct:start");
for(Exchange ex : list) {
        System.out.println("Body: "+ ex.getIn().getBody());
}


But my list of Exchanges is null. I expected it to contain my "TestDebugger"-Exchange.

Actually there is no DebugInterceptor at "direct:start", since
DebugInterceptor di = debugger.getInterceptor("direct:start");
returns null either


So what do I have to do to get use of the Debugger to inspect the nodes, etc.?


thx,
Rob

RE: Debugger InterceptStrategy

by Claus Ibsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

The debugger is not fully implemented yet
http://activemq.apache.org/camel/debugger.html

Fell free to add a ticket in JIRA so we don't forget to add in the blanks.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: RobMMS [mailto:robert.pelger@...]
Sent: 10. oktober 2008 11:24
To: camel-user@...
Subject: Debugger InterceptStrategy


Hi,
I wanted to test the Debugger in my route and tried to add it as an
InterceptStrategy, so that I can inspect the nodes in my route. I've done
the following:

       
// create a simple route and hang in the debugger
cc.addRoutes(new RouteBuilder() {
        public void configure() throws Exception {
       
          // add a debugger interceptor
          getContext().addInterceptStrategy(new Debugger());

          from("direct:start").process(mp).to("direct:end");
                               
        }
});

//send a test message
pt.sendBody("direct:start", "DebuggerTest");
               
//get the Debugger
debugger=Debugger.getDebugger(cc);
               
//get the Exchanges-List of node "direct:start"
List<Exchange> list = debugger.getExchanges("direct:start");
for(Exchange ex : list) {
        System.out.println("Body: "+ ex.getIn().getBody());
}

But my list of Exchanges is null. I expected it to contain my
"TestDebugger"-Exchange.

Actually there is no DebugInterceptor at "direct:start", since
DebugInterceptor di = debugger.getInterceptor("direct:start");
returns null either


So what do I have to do to get use of the Debugger to inspect the nodes,
etc.?


thx,
Rob
--
View this message in context: http://www.nabble.com/Debugger-InterceptStrategy-tp19914918s22882p19914918.html
Sent from the Camel - Users mailing list archive at Nabble.com.

LightInTheBox - Buy quality products at wholesale price!
Need professional support or training for Apache Camel? Graphic Design by Hiram and the Nabble Forum configured by James