camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject CAMEL-6694 Getting hold of the Context ClassLoader from deep within
Date Wed, 20 Nov 2013 00:31:46 GMT
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

This API change will percolate up to several other classes, such as:


I really dislike this solution, but I don't think there's another way to
get hold of the CamelContext. Or is there? Some clever trick I'm unaware of?

If there's no other way out, we should postpone this change until Camel
3.0, where we're allowed to introduce API changes. Agree?

P.S.: I've enhanced the ObjectHelper with a new method <T> T
runWithClassLoader(ClassLoader cl, Callable<T> callable).


*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist | | twitter: @raulvk

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message