Methods Summary |
---|
protected java.lang.String | classNameToResourceName(java.lang.String className)Converts a class name to a resource name.
return className.replace(".", "/") + ".class";
|
public abstract java.io.File | findContainingJar(java.net.URL resourceURL)
|
public static com.sun.enterprise.appclient.jws.boot.ClassPathManager | getClassPathManager(boolean keepJWSClassLoader)Returns the appropriate type of ClassPathManager.
if (mgr == null) {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
/*
*Distinguish between 1.6 and earlier by seeing if the curent
*class loader - the JNLP class loader - is also a URLClassLoader
*or not.
*/
if (loader instanceof URLClassLoader) {
mgr = new ClassPathManager16(loader, keepJWSClassLoader);
} else {
mgr = new ClassPathManager15(loader, keepJWSClassLoader);
}
}
return mgr;
|
protected java.lang.ClassLoader | getJNLPClassLoader()Returns the Java Web Start-provided class loader recorded when the
class path manager was created.
return jnlpClassLoader;
|
protected java.lang.ClassLoader | getJnlpClassLoader()
return jnlpClassLoader;
|
public abstract java.lang.ClassLoader | getParentClassLoader()Returns the appropriate parent class loader for the ACC.
|
protected boolean | keepJWSClassLoader()
return keepJWSClassLoader;
|
public java.net.URI | locateClass(java.lang.String className)Locates the URI for the JAR containing the specified class
String resourceName = classNameToResourceName(className);
URL classURL = locateResource(resourceName);
File f = findContainingJar(classURL);
if (f == null) {
/*
*Could not locate the class we expected.
*/
throw new ClassNotFoundException(className + "->" + resourceName);
}
return f.toURI();
|
public java.net.URL[] | locateDownloadedJars()Reports URLs for the locally-cached copies of the JARs downloaded by
Java Web Start needed for the ACC's class path and policy settings.
/*
*For each downloaded unsigned app client jar, get a URL that locates
*it and add the URL to the list.
*
*This set of values should be automated on the server side and
*communicated via a property setting in the JNLP document so
*any changes in the list of downloaded files does not need to be made
*there and here.
*/
String probeClassNames = System.getProperty("com.sun.aas.jar.probe.class.names",
"com.sun.enterprise.appclient.jws.boot.JWSACCMain," /* appserv-jwsacc */ +
"com.sun.enterprise.appclient.Main," /* appserv-rt */ +
"com.sun.jdo.api.persistence.enhancer.ByteCodeEnhancer," /* appserv-cmp */ +
"com.sun.enterprise.admin.servermgmt.DomainConfig," /* appserv-admin */ +
"com.sun.enterprise.deployment.client.DeploymentClientUtils," /* appserv-deployment-client */ +
"javax.ejb.EJB," /* javaee */ +
"javax.security.auth.message.module.ServerAuthModule," /* jmac-api */ +
"com.sun.appserv.management.ext.logging.LogAnalyzer," /* appserv-ext */ +
"com.sun.mail.iap.Argument," /* mail */ +
"com.sun.activation.viewers.ImageViewer," /* activation */ +
"com.sun.xml.ws.api.server.WSEndpoint," /* webservices-rt */ +
"com.sun.tools.ws.wsdl.parser.W3CAddressingExtensionHandler," /* webservices-tools */ +
"com.sun.jms.spi.xa.JMSXAConnection," /* imqjmsra */ +
"com.sun.jndi.fscontext.FSContext" /* fscontext */
);
return locateJARs(probeClassNames);
|
public java.net.URL[] | locateJARs(java.lang.String classNamesString)
String [] classNames = classNamesString.split(",");
/*
*For each class name, find the jar that contains it by getting a URL
*to the class and then using that URL to find the jar.
*/
URL [] urls = new URL[classNames.length];
int nextURL = 0;
for (String className : classNames) {
URI jarFileURI = locateClass(className);
URL url = jarFileURI.toURL();
urls[nextURL++] = url;
}
return urls;
|
public java.net.URL[] | locatePersistenceJARs()
return locateJARs(PERSISTENCE_JAR_CLASSES);
|
protected java.net.URL | locateResource(java.lang.String resourceName)Finds a resource using the class's class loader.
URL resourceURL = getClass().getClassLoader().getResource(resourceName);
return resourceURL;
|