camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-1000) Trace interceptor does not work with Spring-event component
Date Tue, 21 Oct 2008 12:42:53 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46620#action_46620
] 

Charles Moulliard commented on CAMEL-1000:
------------------------------------------

Hi,

I live in Belgium. So, the beers will be Belgian (Leffe, Maredsous, Duvel,
...).

KR,

Charles 



> Trace interceptor does not work with Spring-event component
> -----------------------------------------------------------
>
>                 Key: CAMEL-1000
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1000
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Charles Moulliard
>            Assignee: Hadrian Zbarcea
>
> Hi,
> I have tried to activated the tracing inside my java class like this :
>         Tracer tracer = new Tracer();
>         tracer.setLogLevel(LoggingLevel.DEBUG);
>         tracer.setTraceInterceptors(true);
>         tracer.getFormatter().setShowBody(true);
>         tracer.getFormatter().setShowBodyType(true);
>         camelContext.addInterceptStrategy(tracer);
> or inside the springcamel-context file :
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>        http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>     ">
>    
>         <bean id="camelTracer" class="org.apache.camel.processor.interceptor.Tracer">
>                 <property name="traceExceptions" value="false" />
>                 <property name="traceInterceptors" value="true" />
>                 <property name="logLevel" value="DEBUG" />
>         </bean>
>         <bean id="traceFormatter" class="org.apache.camel.processor.interceptor.TraceFormatter">
>                 <property name="showBody" value="true" />
>                 <property name="showBodyType" value="false" />
>                 <property name="showHeaders" value="true" />
>                 <property name="showBreadCrumb" value="false" />
>         </bean>
>         <camelContext id="camel" trace="true"
>                 xmlns="http://activemq.apache.org/camel/schema/spring">
>                 <route>
>                         <from uri="event://default" />
>                         <to uri="stream:out" />
>                 </route>
>         </camelContext>
> </beans>
> but the log does not display the header/body ... information
> Here is the trace using log4j - DEBUG :
> [                          main] DefaultCamelContext            INFO  JMX enabled. Using
InstrumentationLifecycleStrategy.
> [                          main] CamelContextFactoryBean        DEBUG Found JAXB created
routes: [Route[ [From[event://default]] -> [To[stream:out]]]]
> [                          main] SpringCamelContext             DEBUG Publishing event:
org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@dd87b2:
display name [org.springframework.context.support.ClassPathXmlApplicationContext@dd87b2];
startup date [Fri Oct 17 12:23:04 CEST 2008]; root of context hierarchy]
> [                          main] SpringCamelContext             DEBUG Starting the CamelContext
now that the ApplicationContext has started
> [                          main] DefaultInstrumentationAgent    DEBUG Starting JMX agent
on server: com.sun.jmx.mbeanserver.JmxMBeanServer@70be88
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,name=context
> [                          main] DefaultComponent               DEBUG Creating endpoint
uri=[event://default], path=[default], parameters=[{}]
> [                          main] DefaultCamelContext            DEBUG event://default
converted to endpoint: Endpoint[event://default] by component: org.apache.camel.component.event.EventComponent@19fe451
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=endpoints,name="event://default\?id=0xdaebda6"
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=processors,nodeid=to1,name="To[stream:out]"
> [                          main] DefaultComponentResolver       DEBUG Found component:
stream via type: org.apache.camel.component.stream.StreamComponent via META-INF/services/org/apache/camel/component/stream
> [                          main] DefaultComponent               DEBUG Creating endpoint
uri=[stream:out], path=[out], parameters=[{}]
> [                          main] DefaultCamelContext            DEBUG stream:out converted
to endpoint: Endpoint[stream:out] by component: org.apache.camel.component.stream.StreamComponent@111ded2
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=endpoints,name="stream:out\?id=0xb3679825"
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=routes,name="node1"
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=consumers,name=EventConsumer(0x1353249)
> [                          main] DefaultComponent               DEBUG Creating endpoint
uri=[event:default], path=[default], parameters=[{}]
> [                          main] DefaultCamelContext            DEBUG event:default converted
to endpoint: Endpoint[event:default] by component: org.apache.camel.component.event.EventComponent@19fe451
> [                          main] DefaultInstrumentationAgent    DEBUG Registered MBean
with objectname: org.apache.camel:context=dell-charles/camel,type=endpoints,name="event:default\?id=0x1c3b4b06"
> [                          main] ProducerCache                  DEBUG >>>>
Endpoint[event://default] Exchange[Message: Hello there!]
> [                          main] ResolverUtil                   DEBUG Searching for annotations
of org.apache.camel.Converter in packages: [org.apache.camel.converter, org.apache.camel.component.cxf.converter,
org.apache.camel.spring.converter]
> [                          main] ResolverUtil                   DEBUG Using only regular
classloaders
> [                          main] ResolverUtil                   DEBUG Loading from jar:
C:\.m2\repository\org\apache\camel\camel-core\1.5-SNAPSHOT\camel-core-1.5-SNAPSHOT.jar
> [                          main] ResolverUtil                   DEBUG Using only regular
classloaders
> [                          main] ResolverUtil                   DEBUG Loading from jar:
C:\.m2\repository\org\apache\camel\camel-cxf\1.5-SNAPSHOT\camel-cxf-1.5-SNAPSHOT.jar
> [                          main] ResolverUtil                   DEBUG Using only regular
classloaders
> [                          main] ResolverUtil                   DEBUG Found: [class org.apache.camel.component.cxf.converter.CxfConverter,
class org.apache.camel.converter.CollectionConverter, class org.apache.camel.converter.jaxp.StreamSourceConverter,
class org.apache.camel.converter.NIOConverter, class org.apache.camel.converter.stream.StreamCacheConverter,
class org.apache.camel.converter.jaxp.XmlConverter, class org.apache.camel.converter.CamelConverter,
class org.apache.camel.converter.IOConverter, class org.apache.camel.converter.jaxp.DomConverter,
class org.apache.camel.converter.ObjectConverter, class org.apache.camel.converter.jaxp.StaxConverter]
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.component.cxf.converter.CxfConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.CollectionConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.jaxp.StreamSourceConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.NIOConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.stream.StreamCacheConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.jaxp.XmlConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.CamelConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.IOConverter
> [                          main] DefaultTypeConverter           WARN  Overriding type
converter from: InstanceMethodTypeConverter: public java.lang.String org.apache.camel.converter.jaxp.XmlConverter.toString(javax.xml.transform.Source)
throws javax.xml.transform.TransformerException to: StaticMethodTypeConverter: public static
java.lang.String org.apache.camel.converter.IOConverter.toString(javax.xml.transform.Source)
throws javax.xml.transform.TransformerException,java.io.IOException
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.jaxp.DomConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.ObjectConverter
> [                          main] AnnotationTypeConverterLoader  DEBUG Loading converter
class: org.apache.camel.converter.jaxp.StaxConverter
> [                          main] SpringCamelContext             DEBUG Publishing event:
org.apache.camel.component.event.CamelEvent[source=Endpoint[event://default]]
> KR,
> Charles Moulliard

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message