I am trying to use MyCustomClassLoader to load java classes (my app is running under WebLogic).
Right now I am facing two problems I don't know what to do about:
1. I have tried to load classes through MyCustomClassLoader and all of them got loaded, but when it's turn to load java.lang.Object, a SecurityException is thrown saying "prohibited package name: java/lang". I have read it somewhere that I will not be able to load java.* package. Is that true? Is there a way around it?
2. While my classloader is running fine (except for the problem # 1), I am still trying to make it the default classloader for my app. The approach I chose (and tell my if this approach is wrong) is to make MyCustomClassLoader the default one for the threads in the threadpool serving my app (ExecuteThread 'number' for the application 'my application name'). I change all of them, verify that they have been changed, launch my first servlet, chech them again and notice that threads used to load my servlet have been changed to sun.something.something (the default classloader). What am I doing wrong? Is the approach I chose wrong?
I will give you 500 and an A grade if you help me make it work.