Package org.apache.tuscany.sca.contribution.java

Examples of org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider


                //    public ClassLoader run() {
                //        return Thread.currentThread().getContextClassLoader();
                //    }
                //});
                ClassLoader contextClassLoader = ServiceDiscovery.getInstance().getServiceDiscoverer().getClass().getClassLoader();
                ContributionClassLoaderProvider provider = null;
                try {
                    ContributionClassloaderProviderExtensionPoint providers =
                        registry.getExtensionPoint(ContributionClassloaderProviderExtensionPoint.class);
                   
                    provider = providers.getProvider(contribution.getType());

                } catch (Throwable e) {
                    // Ignore errors
                }
                if (provider == null) {
                    provider = new DefaultContributionClassLoaderProvider();
                }
                cl = provider.getClassLoader(contribution, contextClassLoader);
                contribution.setClassLoader(cl);
            }
            this.classLoader = new WeakReference<ClassLoader>(cl);
        } else {
            // This path should be used only for unit testing.
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.java.ContributionClassLoaderProvider

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.