camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ludington <>
Subject Classloaders and ScriptBuilder
Date Tue, 20 Feb 2018 01:18:16 GMT
Is there a means to have camel's script builder look at other classloaders
besides the one in which ScriptBuilder was loaded?  We have a scenario with
a core camel container, into which people deploy their own applications in
private classloaders.  (As part of the tooling, camel-script is part of
this core container.  The issue arises when a user needs to compile a
groovy script against custom java services they have written an added to
their particular deployment container.  Adding a classloader to the core
PackageScanClassResolver has no effect, presumably because in, the first attempt to create a ScriptEngine here:

It defaults to using the classloader that loaded ScriptBuilder, rather than
the Camel Context or the current Thread's classloader, and all pathways I
have found initializing through the xml dialect, e.g.
<camel:script><camel:groovy/></camel:script> seem, when creating routes,
go through ScriptBuilder#supportScriptEngine, which then initializes the
engine as above. Is there any point before which a Classloader can be
specified for the script engines that I may be missing?


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