FAMClassLoader.java revision 1bad1b69167cb45dd69ec6863eedcaf795df19d7
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: FAMClassLoader.java,v 1.20 2009/06/04 01:16:48 mallas Exp $
*
*/
/**
* Portions Copyrighted 2013 ForgeRock AS
*/
/**
* OpenSSO class loader to overcome the class loading
* issues of jars that are not compatible for OpenSSO.
*/
public class FAMClassLoader {
public static ClassLoader cl;
// Jar files path at OpenSSO client, for OpenSSO
// classloader to load those jar files.
public static final String FAM_CLASSLOADER_DIR_PATH =
"com.sun.identity.classloader.client.jarsPath";
/** Creates a new instance of FAMClassLoader */
public FAMClassLoader() {
}
return cl;
}
}
try {
} else {
}
}
// first create a protected area so that we load WS 2.1 API
// and everything that depends on them, inside OpenSSO
// Enterprise classloader.
// then this classloader loads the API and tools.jar
//Thread.currentThread().setContextClassLoader(cl);
}
}
}
return (cl);
}
}
try {
}
} catch (Exception e) {
e.printStackTrace();
}
return urls;
}
}
FILE_BEGIN = "file:/";
}
+ FILE_SEPARATOR + "opensso";
try {
}
} catch (Exception e) {
e.printStackTrace();
}
return urls;
}
private static void setSystemProperties() {
// Fix for Geronimo Application server and WebLogic 10
"com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl");
"com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
"com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory");
"com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl");
}
/**
* The list of jar files to be loaded by FAMClassLoader.
*
* TODO -- Revisit to fix.
*/
"webservices-api-2009-14-01.jar", // "webservices-api.jar",
"webservices-rt-2009-29-07.jar", // "webservices-rt.jar",
"webservices-tools-2.1-b16.jar", // "webservices-tools.jar",
"webservices-extra-api-2003-09-04.jar", // "webservices-extra-api.jar",
"webservices-extra-2008-03-12.jar", // "webservices-extra.jar",
"xercesImpl-2.11.0.jar", // "xercesImpl.jar",
"xml-apis-2.11.0.jar",
"xml-resolver-2.11.0.jar",
"xml-serializer-2.11.0.jar",
"openam-shared-11.0.0-SNAPSHOT.jar", // "opensso.jar",
"openam-dtd-schema-11.0.0-SNAPSHOT.jar",
"openam-entitlements-11.0.0-SNAPSHOT.jar",
"openam-idsvcs-schema-11.0.0-SNAPSHOT.jar",
"openam-jaxrpc-schema-11.0.0-SNAPSHOT.jar",
"openam-liberty-schema-11.0.0-SNAPSHOT.jar",
"openam-rest-11.0.0-SNAPSHOT.jar",
"openam-saml2-schema-11.0.0-SNAPSHOT.jar",
"openam-wsfederation-schema-11.0.0-SNAPSHOT.jar",
"openam-xacml3-schema-11.0.0-SNAPSHOT.jar",
"xalan-2.7.1.jar", // "xalan.jar",
"openam-federation-library-11.0.0-SNAPSHOT.jar", // "openfedlib.jar"
"OpenFM-11.0.0-SNAPSHOT.jar"
};
/**
* The list of package prefixes we want the
* {@link MaskingClassLoader} to prevent the parent
* classLoader from loading.
*/
"com.sun.istack.tools.",
"com.sun.tools.jxc.",
"com.sun.tools.xjc.",
"com.sun.tools.ws.",
"com.sun.codemodel.",
"com.sun.relaxng.",
"com.sun.xml.xsom.",
"com.sun.xml.bind.",
"com.sun.xml.bind.v2.",
"com.sun.xml.messaging.",
"com.sun.xml.ws.",
"com.sun.xml.ws.addressing.",
"com.sun.xml.ws.api.",
"com.sun.xml.ws.api.addressing.",
"com.sun.xml.ws.server.",
"com.sun.xml.ws.transport.",
"com.sun.xml.wss.",
"com.sun.xml.security.",
"com.sun.xml.xwss.",
"javax.xml.bind.",
"javax.xml.ws.",
"javax.jws.",
"javax.jws.soap.",
"javax.xml.soap.",
"com.sun.istack.",
"com.sun.identity.wss.",
"com.sun.identity.wssagents.",
"com.sun.org.apache.xml.internal.",
"com.sun.org.apache.xpath.internal.",
"com.sun.org.apache.xalan.internal.",
"com.sun.org.apache.xerces.internal.",
"com.sun.identity.saml.xmlsig.",
"com.sun.identity.saml.",
"com.sun.identity.liberty.ws.",
"com.sun.identity.xmlenc.",
"com.sun.xml.stream."
};
"com.sun.istack.tools.",
"com.sun.tools.jxc.",
"com.sun.tools.xjc.",
"com.sun.tools.ws.",
"com.sun.codemodel.",
"com.sun.relaxng.",
"com.sun.xml.xsom.",
"com.sun.xml.bind.",
"com.sun.xml.bind.v2.",
"com.sun.xml.messaging.",
"com.sun.xml.ws.",
"com.sun.xml.ws.addressing.",
"com.sun.xml.ws.api.",
"com.sun.xml.ws.api.addressing.",
"com.sun.xml.ws.server.",
"com.sun.xml.ws.transport.",
"com.sun.xml.wss.",
"com.sun.xml.security.",
"com.sun.xml.xwss.",
"javax.xml.bind.",
"javax.xml.ws.",
"javax.jws.",
"javax.jws.soap.",
"javax.xml.soap.",
"com.sun.istack.",
"com.sun.identity.wss.",
"com.sun.identity.wssagents.",
"com.sun.org.apache.xpath.internal.",
"com.sun.org.apache.xalan.internal.",
"com.sun.org.apache.xerces.internal.",
"com.sun.identity.saml.xmlsig.",
"com.sun.identity.xmlenc.",
"com.sun.identity.saml.",
"com.sun.identity.liberty.ws.",
"com.sun.xml.stream.",
"javax.xml.crypto.",
"org.jcp.xml.dsig."
};
/**
* The list of resources we want the
* {@link MaskingClassLoader} to prevent the parent
* classLoader from loading.
*/
};
}