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.
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)