Package org.glassfish.internal.api

Examples of org.glassfish.internal.api.ConnectorClassFinder


    }

    private ConnectorClassFinder createRARClassLoader(final ClassLoader parent, String moduleDir,
                                                      final String moduleName, List<URI> appLibs)
            throws ConnectorRuntimeException{
        ConnectorClassFinder cl = null;

        try{
            final DelegatingClassLoader.ClassFinder librariesCL = getLibrariesClassLoader(appLibs);
            cl = (ConnectorClassFinder)AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws Exception {
                        final ConnectorClassFinder ccf = new ConnectorClassFinder(parent, moduleName, librariesCL);
                        if (processEnv.getProcessType().isEmbedded()) {
                            events.register(new EventListener() {
                                public void event(Event event) {
                                    if (event.is(EventTypes.PREPARE_SHUTDOWN)) {
                                        ccf.done();
                                    }
                                }
                            });
                        }
                        return ccf;
View Full Code Here


                    libraries = new ArrayList<URI>();
                } else {
                    libraries = ConnectorsUtil.getInstalledLibrariesFromManifest(location, env);
                }

                ConnectorClassFinder ccf = createRARClassLoader(location, null, rarName, libraries);
                classLoaders.add(ccf);
            }
        //    systemRARClassLoaders = classLoaders;
        //}
        //return systemRARClassLoaders;
View Full Code Here

        if(_logger.isLoggable(Level.FINEST)){
            _logger.finest("connector-descriptor during load : " + connDesc);
        }

        boolean isEmbedded = ConnectorsUtil.isEmbedded(context);
        ConnectorClassFinder ccf = null;
        ClassLoader classLoader = null;
        //this check is not needed as system-rars are never deployed, just to be safe.
        if (!ConnectorsUtil.belongsToSystemRA(moduleName)) {
            try {
                //for a connector deployer, classloader will always be ConnectorClassFinder
View Full Code Here

            //remove it only if it is not embedded
            if (!ConnectorsUtil.isEmbedded(context)) {
                //remove the class-finder (class-loader) from connector-class-loader chain
                DelegatingClassLoader dcl = clh.getConnectorClassLoader(null);
                for(DelegatingClassLoader.ClassFinder cf : dcl.getDelegates()){
                    ConnectorClassFinder ccf = (ConnectorClassFinder)cf;
                    if(ccf.getResourceAdapterName().equals(moduleName)){
                        dcl.removeDelegate(ccf);
                        break;
                    }
                }
            }
View Full Code Here

    }

    private ConnectorClassFinder createRARClassLoader(final ClassLoader parent, String moduleDir,
                                                      final String moduleName, List<URI> appLibs)
            throws ConnectorRuntimeException{
        ConnectorClassFinder cl = null;

        try{
            final DelegatingClassLoader.ClassFinder librariesCL = getLibrariesClassLoader(appLibs);
            cl = (ConnectorClassFinder)AccessController.doPrivileged(new PrivilegedExceptionAction() {
                public Object run() throws Exception {
                        final ConnectorClassFinder ccf = new ConnectorClassFinder(parent, moduleName, librariesCL);
                        if (processEnv.getProcessType().isEmbedded()) {
                            events.register(new EventListener() {
                                public void event(Event event) {
                                    if (event.is(EventTypes.PREPARE_SHUTDOWN)) {
                                        ccf.done();
                                    }
                                }
                            });
                        }
                        return ccf;
View Full Code Here

                    libraries = new ArrayList<URI>();
                } else {
                    libraries = ConnectorsUtil.getInstalledLibrariesFromManifest(location, env);
                }

                ConnectorClassFinder ccf = createRARClassLoader(location, null, rarName, libraries);
                classLoaders.add(ccf);
            }
        //    systemRARClassLoaders = classLoaders;
        //}
        //return systemRARClassLoaders;
View Full Code Here

TOP

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

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.