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

ConnectorRARClassLoader

public class ConnectorRARClassLoader extends SecureClassLoader
ConnectorRARClassLoader finds classes and resources from a JAR file without exploding it. This uses the JarResourceExtractor for finding classes and resources inside the archive This classloader is _used_ only by the admin GUI to retrieve resource adapter class properties without exploding the connector archive.
author
Sivakumar Thyagarajan

Fields Summary
private JarResourceExtractor
jarResources
Constructors Summary
public ConnectorRARClassLoader(String jarName, ClassLoader parent)

        super(parent);
        // Create the JarResource and suck in the .jar file.
        jarResources = new JarResourceExtractor(jarName);
    
Methods Summary
public java.lang.ClassfindClass(java.lang.String name)

        byte[] b = loadClassBytes(name);
        if (b == null) {
            throw new ClassNotFoundException(name);
        }
        return defineClass(name, b, 0, b.length);
    
private java.lang.StringformatClassName(java.lang.String className)

        return className.replace('.", '/") + ".class";
    
public java.lang.StringgetResourceAsString(java.lang.String raDeploymentDescPath)

        return new String(jarResources.getResource(raDeploymentDescPath));
    
protected byte[]loadClassBytes(java.lang.String className)

        className = formatClassName(className);
        return (jarResources.getResource(className));