[ https://issues.apache.org/activemq/browse/SM-591?page=all ]
Philip Dodds closed SM-591.
---------------------------
Resolution: Fixed
Refactored to add the support for the handling of Classloaders from within the
ServiceUnit, if a ServiceUnit implementation is going to provide Java classes
then it should return a classloader for that SU.
> Extend the servicemix-commons to provide better classloading semantics
> ----------------------------------------------------------------------
>
> Key: SM-591
> URL: https://issues.apache.org/activemq/browse/SM-591
> Project: ServiceMix
> Issue Type: Improvement
> Affects Versions: 3.0
> Reporter: Philip Dodds
> Fix For: 3.1
>
>
> Add a getConfigurationClassLoader to the ServiceUnit class in
> org.apache.servicemix.common. This can be used to ensure that is a
> ServiceUnit is going to contain Java Code then it needs to ensure that it
> provides a classloader.
> This method can then be used in the AsyncBaseLifeCycle in the method
> processExchange:
> Refactor the processExchange to be doProcessExchange and then create a new
> processExchange akin to this:
> ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
> try {
> if (getServiceUnit().getConfigurationClassLoader()!=null) {
> ClassLoader classLoader =
> endpoint.getServiceUnit().getConfigurationClassLoader();
> Thread.currentThread().setContextClassLoader(classLoader);
> }
> doProcessExchange(exchange);
> } finally {
> Thread.currentThread().setContextClassLoader(oldCl);
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira