Saminda,

>
> Here's the code pointed out by Niall:
>
> >    ClassLoader loader = Thread.currentThread().getContextClassLoader();
> >    if (loader == null) {
> >        loader = this.getClass().getClassLoader();
> >    }
>
>
>
> My concern is "ClassLoader loader =
Thread.currentThread().getContextClassLoader()" reference is not null, the
"loader" will be referenced the TCCL, which is not backed up by the module
layer.  In Felix,"Thread.currentThread().getContextClassLoader()" points to
the application classloader. In this case, If the later logic would try to
load resources/classes from "loader" it could only see resources/classes
from app classloader.

Thank you!

Saminda

-- 
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org

Reply via email to