Examples of DelegatingClassLoader


Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader

            if (types == null) {
                types = new ArrayList<Class>();
            }
            types.add(type);

            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return (T) createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader

            List<Class> types = getVisibleInterfaces(target, classLoader, true);
            if (types == null) {
                return null;
            }
           
            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader

            if (types == null) {
                types = new ArrayList<Class>();
            }
            types.add(type);

            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return (T) createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader

            List<Class> types = getVisibleInterfaces(target, classLoader, true);
            if (types == null) {
                return null;
            }
           
            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

        ClassLoader infinispanCl = EmbeddedCacheManager.class.getClassLoader();
        ClassLoader portalCl = Thread.currentThread().getContextClassLoader();

        // Infinispan classloader is first delegate, so in AS7 environment, infinispan is able to see
        // jgroups3 classes with bigger priority than jgroups2 classes
        ClassLoader delegating = new DelegatingClassLoader(infinispanCl, portalCl);

        try {
            // Set delegating classloader as tccl
            Thread.currentThread().setContextClassLoader(delegating);
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

            public ClassLoader run() {
                return Thread.currentThread().getContextClassLoader();
            }
        });

        return new DelegatingClassLoader(tccl, GroovyShell.class.getClassLoader());
    }
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

        });

        try {
            SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>() {
                public Void run() {
                    DelegatingClassLoader cl = new DelegatingClassLoader(old,
                            org.picketlink.idm.api.IdentitySessionFactory.class.getClassLoader());
                    Thread.currentThread().setContextClassLoader(cl);
                    return null;
                }
            });
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

        boolean enabled = Boolean.parseBoolean(enabledPar);

        if (enabled) {
            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
            ClassLoader oauth = OAuthProviderType.class.getClassLoader();
            ClassLoader delegating = new DelegatingClassLoader(tccl, oauth);
            Class<OAuthProviderProcessor<T>> processorClass = (Class<OAuthProviderProcessor<T>>)delegating.loadClass(oauthProviderProcessorClass);
            OAuthProviderProcessor<T> oauthProviderProcessor = containerContext.getContainer().getComponentInstanceOfType(processorClass);

            OAuthPrincipalProcessor principalProcessor = null;
            Class<OAuthPrincipalProcessor> principalProcessorClass = (Class<OAuthPrincipalProcessor>) (principalProcessorClassName != null ? delegating
                    .loadClass(principalProcessorClassName) : DefaultPrincipalProcessor.class);
            principalProcessor = containerContext.getContainer().getComponentInstanceOfType(principalProcessorClass);
            if (principalProcessor == null) {
                principalProcessor = principalProcessorClass.newInstance();
            }
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

        boolean enabled = Boolean.parseBoolean(enabledPar);

        if (enabled) {
            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
            ClassLoader oauth = OAuthProviderType.class.getClassLoader();
            ClassLoader delegating = new DelegatingClassLoader(tccl, oauth);
            Class<OAuthProviderProcessor<T>> processorClass = (Class<OAuthProviderProcessor<T>>)delegating.loadClass(oauthProviderProcessorClass);
            OAuthProviderProcessor<T> oauthProviderProcessor = (OAuthProviderProcessor<T>)containerContext.getContainer().getComponentInstanceOfType(processorClass);

            oauthPrType = new OAuthProviderType<T>(key, enabled, usernameAttributeName, oauthProviderProcessor, initOAuthURL, friendlyName);
        } else {
            oauthPrType = null;
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader

            public ClassLoader run() {
                return Thread.currentThread().getContextClassLoader();
            }
        });

        return new DelegatingClassLoader(tccl,
            GroovyClassLoader.class.getClassLoader(),
            javax.portlet.PortletConfig.class.getClassLoader());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.