FileDocCategorySizeDatePackage
ConnectorClassLoaderUtils.javaAPI DocGlassfish v2 API3294Fri May 04 22:34:26 BST 2007com.sun.enterprise.connectors.util

ConnectorClassLoaderUtils

public class ConnectorClassLoaderUtils extends Object
This is an util class to get the ClassLoader pertaining to the stand alone connector modules.
author
Srikanth P

Fields Summary
static Logger
_logger
Constructors Summary
Methods Summary
public static java.lang.ClassLoadergetClassLoader(java.lang.String moduleDir)
Obtains the class loader. The Connector class loader is a singleton instance. The directory where rar is exploded is added to the classloader path before returing the instance.

param
moduleDir Directory where rar is exploded
return
connector Classloader instance

    
                                                        

         
        try {
            ClassLoader jcl = null;
            jcl = ConnectorClassLoader.getInstance();
            File f = new File(moduleDir);
                       ((ConnectorClassLoader)jcl).appendURL(f);
            return jcl;
        } catch (IOException ex) {
            _logger.log(Level.SEVERE,
                     "rardeployment.malfarmed_url_for_classloader",moduleDir);
        }
        return null;