This content has been marked as final.
Show 2 replies
-
1. Re: Why ObjectInputStreamWithClassLoader overrides resolveClass method?
clebert.suconic Jun 24, 2010 10:39 AM (in response to gaohoward)ObjectInputStream doesn't define any way to override the classLoader.
Say the user is doing objMessage.getObject() from a MDB. The class may be only defined at the EAR's classLoader, and its classLoader is accessed through the ContextClassLoader on the Thread.
ObjectInputStream would only look for objects at the classPath (or root classLoader). So, we needed to implement the feature.
We need to do it to couple with Application Server's classLoading.
-
2. Re: Why ObjectInputStreamWithClassLoader overrides resolveClass method?
clebert.suconic Jun 24, 2010 10:41 AM (in response to clebert.suconic)Also, if it can't find it on that Thread Context Class Loader (TCCL) it will look at the super method which will look at the root classLoader (classPath)