Thank a lot, it works. And it was far simplest method to make it work...
I just really don't understand why it work, as in method:
ContextClassLoaderUtils.doWithClassLoader(
null, // getClass().getClassLoader()
new Callable<Object>() ....
you use null parameter, wich causes usage of default classloader
anyway, so what is the difference?
Later i found some problems using SecurityManager, it somehow interact
with osgi - and it fails to initialize
org.osgi.framework.AdminPermission, but then i realized that i don't
need to download code... and it works.
Thanks again.
Kamil
PS: If you are around Slovakia sometimes, I'l buy you a beer :)
2009/10/27 Toni Menzel <[email protected]>:
> Hi,
>
> we do this at Pax Exam all the time. Actually its important to work around
> the classloader when accessing the rmiregistry.
> Have a look at
> https://scm.ops4j.org/repos/ops4j/projects/pax/exam/pax-exam-container-rbc/src/main/java/org/ops4j/pax/exam/rbc/internal/Activator.java
>
> Because you have to do that in a context (before doing X and after doing X)
> the meat is hidden in a helper:
> https://scm.ops4j.org/repos/ops4j/projects/pax/swissbox/pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/ContextClassLoaderUtils.java
>
> hth,
> Toni
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]