Package org.glassfish.internal.api

Examples of org.glassfish.internal.api.ClassLoaderHierarchy


            _logger.log(Level.FINE, "ASClassLoaderUtil.getModuleClassPath " +
                    "for module Id : " + moduleId);
        }

        StringBuilder classpath = new StringBuilder(getModulesClasspath(habitat));
        ClassLoaderHierarchy clh =
                habitat.getByContract(ClassLoaderHierarchy.class);
        final String commonClassPath = clh.getCommonClassPath();
        if (commonClassPath != null && commonClassPath.length() > 0) {
            classpath.append(commonClassPath).append(File.pathSeparator);
        }
        addDeployParamLibrariesForModule(classpath, moduleId, deploymentLibs, habitat);
        if (_logger.isLoggable(Level.FINE)) {
View Full Code Here


                archiveHandler.expand(archive, expandedArchive, context);
                context.setSource(expandedArchive);
            }

            context.setPhase(DeploymentContextImpl.Phase.PREPARE);
            ClassLoaderHierarchy clh = clhProvider.get();
            context.createDeploymentClassLoader(clh, archiveHandler);
            cl = context.getClassLoader();
            deployment.getDeployableTypes(context);
            deployment.getSniffers(archiveHandler, null, context);
            return processDOL(context);
View Full Code Here

            Realm r = habitat.getService(Realm.class, name);
            if (r == null) {
                try {
                    //TODO: workaround here. Once fixed in V3 we should be able to use
                    //Context ClassLoader instead.
                    ClassLoaderHierarchy hierarchy =
                            habitat.getService(ClassLoaderHierarchy.class);
                    realmClass = hierarchy.getCommonClassLoader().loadClass(className);
                    Object obj = realmClass.newInstance();
                    r = (Realm) obj;
                } catch (ClassNotFoundException ex) {
                    realmClass = Class.forName(className);
                    Object obj = realmClass.newInstance();
View Full Code Here

                archiveHandler.expand(archive, expandedArchive, context);
                context.setSource(expandedArchive);
            }

            context.setPhase(DeploymentContextImpl.Phase.PREPARE);
            ClassLoaderHierarchy clh = clhProvider.get();
            context.createDeploymentClassLoader(clh, archiveHandler);
            cl = context.getClassLoader();
            deployment.getDeployableTypes(context);
            deployment.getSniffers(archiveHandler, null, context);
            return processDOL(context);
View Full Code Here

     * @see org.glassfish.internal.api.ClassLoaderHierarchy#getAppLibClassLoader(String, List<URI>)
     */
    public ClassLoader getAppLibClassLoader(String application, List<URI> libURIs)
            throws MalformedURLException {

        ClassLoaderHierarchy clh = habitat.getService(ClassLoaderHierarchy.class);
        DelegatingClassLoader connectorCL = clh.getConnectorClassLoader(application);

        if (libURIs == null || libURIs.isEmpty()) {
            // Optimization: when there are no libraries, why create an empty
            // class loader in the hierarchy? Instead return the parent.
            return connectorCL;
View Full Code Here

     * @see org.glassfish.internal.api.ClassLoaderHierarchy#getAppLibClassLoader(String, List<URI>)
     */
    public ClassLoader getAppLibClassLoader(String application, List<URI> libURIs)
            throws MalformedURLException {

        ClassLoaderHierarchy clh = habitat.getComponent(ClassLoaderHierarchy.class);
        DelegatingClassLoader connectorCL = clh.getConnectorClassLoader(application);

        if (libURIs == null || libURIs.isEmpty()) {
            // Optimization: when there are no libraries, why create an empty
            // class loader in the hierarchy? Instead return the parent.
            return connectorCL;
View Full Code Here

        String name = null;
        ClassLoader oldTcc = Thread.currentThread().getContextClassLoader();
        try {
            //TODO: workaround here. Once fixed in V3 we should be able to use
            //Context ClassLoader instead.
            ClassLoaderHierarchy hierarchy =
                            habitat.getComponent(ClassLoaderHierarchy.class);
            ClassLoader tcc = hierarchy.getCommonClassLoader();
            Thread.currentThread().setContextClassLoader(tcc);
           
            policyLoader.loadPolicy();
           
            WebSecurityManagerFactory wsmf =habitat.getComponent(WebSecurityManagerFactory.class);
View Full Code Here

            Realm r = habitat.getComponent(Realm.class, name);
            if (r == null) {
                try {
                    //TODO: workaround here. Once fixed in V3 we should be able to use
                    //Context ClassLoader instead.
                    ClassLoaderHierarchy hierarchy =
                            habitat.getComponent(ClassLoaderHierarchy.class);
                    realmClass = hierarchy.getCommonClassLoader().loadClass(className);
                    Object obj = realmClass.newInstance();
                    r = (Realm) obj;
                } catch (ClassNotFoundException ex) {
                    realmClass = Class.forName(className);
                    Object obj = realmClass.newInstance();
View Full Code Here

            Realm r = habitat.getService(Realm.class, name);
            if (r == null) {
                try {
                    //TODO: workaround here. Once fixed in V3 we should be able to use
                    //Context ClassLoader instead.
                    ClassLoaderHierarchy hierarchy =
                            habitat.getService(ClassLoaderHierarchy.class);
                    realmClass = hierarchy.getCommonClassLoader().loadClass(className);
                    Object obj = realmClass.newInstance();
                    r = (Realm) obj;
                } catch (ClassNotFoundException ex) {
                    realmClass = Class.forName(className);
                    Object obj = realmClass.newInstance();
View Full Code Here

          deplLogger.log(Level.FINE,
                         "ASClassLoaderUtil.getModuleClassPath " + "for module Id : " + moduleId);
        }

        StringBuilder classpath = new StringBuilder(getModulesClasspath(habitat));
        ClassLoaderHierarchy clh =
                habitat.getService(ClassLoaderHierarchy.class);
        final String commonClassPath = clh.getCommonClassPath();
        if (commonClassPath != null && commonClassPath.length() > 0) {
            classpath.append(commonClassPath).append(File.pathSeparator);
        }
        addDeployParamLibrariesForModule(classpath, moduleId, deploymentLibs, habitat);
        if (deplLogger.isLoggable(Level.FINE)) {
View Full Code Here

TOP

Related Classes of org.glassfish.internal.api.ClassLoaderHierarchy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.