Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-21 Thread Raul Kripalani
Well, this ticket is about log statements tossed by the Log EIP (and possibly the Log component too) carrying incorrect values for the bundle.name and bundle.id MDC entries. They invariably refer to the camel-core bundle, because that's where the Logger was initialised from. So my first attempt t

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-21 Thread Claus Ibsen
Why is it you need that ClassLoader in the first place? On Wed, Nov 20, 2013 at 1:31 AM, Raul Kripalani wrote: > Hey guys, > > To solve CAMEL-6694, I'm having to enhance the constructors of the > CamelLogger and CamelLogProcessor to pass in either: > > - the ClassLoader of the Camel context (ob

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-21 Thread Raul Kripalani
Hi Claus, I thought about that, but I don't think it'll work. Definitely not for the CamelLogger class; and I'm 90% confident that it won't work either for the CamelLogProcessor, as it doesn't live in the Registry. It is constructed programmatically. Given that route initialization/construction

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-21 Thread Raul Kripalani
Hi Johan Any other ideas that could help solve the issue? Thoughts welcome. Thanks, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | t

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-21 Thread Raul Kripalani
Hi Willem, Unfortunately this is not the case, as endpoints and EIPs are constructed at route initialisation time. So we have no Exchange to work with. Regards, *Raúl Kripalani* Apache Camel PMC Member & Committer | Enterprise Architect, Open Source Integration specialist http://about.me/raulkri

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-19 Thread Claus Ibsen
You can implement CamelContextAware and have CamelContext injected. Though this only happens for services and whatnot Camel setup for you. Not sure if it the injection would happen for these classes you mention though. On Wed, Nov 20, 2013 at 1:31 AM, Raul Kripalani wrote: > Hey guys, > > To so

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-19 Thread Johan Edstrom
I really don't want classloader dinking. On Nov 19, 2013, at 7:19 PM, Willem jiang wrote: > You can get the CamelContext from the Exchange which can be accessed from > CamelLogProcessor. > But I’m not sure if the setting the TCCL can resolve the issue of CAMEL-6694. > > > -- > Willem Jiang

Re: CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-19 Thread Willem jiang
You can get the CamelContext from the Exchange which can be accessed from CamelLogProcessor. But I’m not sure if the setting the TCCL can resolve the issue of CAMEL-6694. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspo

CAMEL-6694 Getting hold of the Context ClassLoader from deep within

2013-11-19 Thread Raul Kripalani
Hey guys, To solve CAMEL-6694, I'm having to enhance the constructors of the CamelLogger and CamelLogProcessor to pass in either: - the ClassLoader of the Camel context (obtained with CamelContext#getApplicationClassLoader) - or - - the Camel context itself, letting the constructors call