Title: JBoss Classloader Problem

Hi,

I encoutered a problem in JBossMQ's SpyObjectMessage::getObject(), which has to do with JBoss Classloader.

Basically, "return Thread.currentThread().getContextClassLoader().loadClass(v.getName());" throws ClassNotFoundException, and the Class is indeeded part of a JAR file gets deployed inside lib/ext directory.

   public Serializable getObject()
      throws JMSException
   {
        ...
            class ObjectInputStreamExt
               extends ObjectInputStream
            {
               ObjectInputStreamExt(InputStream is)
                  throws IOException
               {
                  super(is);
               }

               protected Class resolveClass(ObjectStreamClass v)
                  throws IOException, ClassNotFoundException
               {
                  try {
                    return Thread.currentThread().getContextClassLoader().loadClass(v.getName());
                  }catch(ClassNotFoundException e) {
                    throw e;
                  }

               }
            }
                ...
            }
         }
      }


So, I am guessing this is a timing issue when the JBoss Classloader hasn't been able to load the containing Jar file. However, could someone give me some information on how JBoss classloader works with respect to JARs deployed inside lib/ext, and when and how will these jars been loaded.

thanks,
sheng

Reply via email to