Package org.rioproject.loader

Examples of org.rioproject.loader.CommonClassLoader


        Map<String, Object> configParms = new HashMap<String, Object>();

        /* Set the ClassLoader for the DiscoveryManagementPool to be the
         * CommonCLassLoader, not the current context ClassLoader */
        ClassLoader cCL = Thread.currentThread().getContextClassLoader();
        CommonClassLoader common = CommonClassLoader.getInstance();
        Thread.currentThread().setContextClassLoader(common);
        try {
            /* Set the Configuration for the DiscoveryManagementPool */
            DiscoveryManagementPool.getInstance().setConfiguration(config);
            LookupCachePool.getInstance().setConfiguration(config);
View Full Code Here


        if(className.equals(SoftwareSupport.class.getSimpleName())) {
            pCap = new SoftwareSupport();
        } else if(className.equals(SoftwareSupport.class.getName())) {
            pCap = new SoftwareSupport();
        } else {
            CommonClassLoader cl = CommonClassLoader.getInstance();
            Class clazz = cl.loadClass(className);
            pCap = (PlatformCapability)clazz.newInstance();
        }
        if(mapping!=null)
            pCap.defineAll(mapping);
        return (pCap);
View Full Code Here

    public static URL[] getLoadableClassPath(PlatformCapability platformCapability) throws MalformedURLException {
        String[] classPath = platformCapability.getClassPath();
        if(classPath==null)
            return(new URL[0]);
        ClassLoader currentCL = Thread.currentThread().getContextClassLoader();
        CommonClassLoader cCL = CommonClassLoader.getInstance();
        URL[] loadedURLs = null;
        try {
            Thread.currentThread().setContextClassLoader(cCL);
            loadedURLs = cCL.getURLs();
        } finally {
            Thread.currentThread().setContextClassLoader(currentCL);
        }
        List<URL> loadables = new ArrayList<URL>();
        URL[] urls = PlatformCapabilityConfig.toURLs(classPath);
View Full Code Here

        /*
        if(commonJARs.length==0)
            throw new RuntimeException("No commonJARs have been defined");
        */
        CommonClassLoader commonCL = CommonClassLoader.getInstance();
        if(logger.isDebugEnabled())
            logger.debug("Created {}", commonCL.getClass().getName());
        if(logger.isTraceEnabled()) {
            StringBuilder buffer = new StringBuilder();
            for(int i=0; i<commonJARs.length; i++) {
                if(i>0)
                    buffer.append("\n");
                buffer.append(commonJARs[i].toExternalForm());
            }
            logger.trace("commonJARs=\n{}", buffer.toString());
        }
        commonCL.addCommonJARs(commonJARs);
        final Thread currentThread = Thread.currentThread();
        ClassLoader currentClassLoader = currentThread.getContextClassLoader();

        ClassAnnotator annotator = new ClassAnnotator(ClassLoaderUtil.getCodebaseURLs(getCodebase()));

View Full Code Here

                                               final ServiceBeanManager jsbManager,
                                               final ServiceBeanContainer container) throws ServiceBeanInstantiationException {
        ServiceBeanFactory.Created created = null;
        MarshalledInstance marshalledProxy = null;
        ServiceBeanContext context;
        CommonClassLoader commonCL = CommonClassLoader.getInstance();
        ComputeResource computeResource = container.getComputeResource();

        /*
         * Provision service jars
         */
 
View Full Code Here

TOP

Related Classes of org.rioproject.loader.CommonClassLoader

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.