Examples of ASURLClassLoader


Examples of com.sun.appserv.server.util.ASURLClassLoader

                try {
          ClassLoader urlLoader = classLoaderRegistry.get(url.toURI());
                //if this library has already been referred in a different application and been
                //loaded, share this library by reusing the same classloader.
                if(urlLoader == null) {
                    urlLoader = new ASURLClassLoader(new URL[]{url}, parentClassLoader);
              classLoaderRegistry.put(url.toURI(),urlLoader);
                }
                appChain.addToList(urlLoader);
        } catch (URISyntaxException e) {
          _logger.log(Level.FINE, "Error while resolving " + url + " to URI");
View Full Code Here

Examples of com.sun.appserv.server.util.ASURLClassLoader

      //get all jars associated with this addon
      URL[] addOnURLs = getURLList(addOnsManifestsMap.get(addOnName));
      logFine(" addon: " + addOnName + " urls: " + addOnURLs);
     
      //create a URLClassLoader for this addon - parent set to shared classloader
      ASURLClassLoader addonClassLoader = new ASURLClassLoader(addOnURLs, _sharedClassLoader);
      //keep a map so that we can remove it during uninstall-addon
      addonsMap.put(addOnName, addonClassLoader);
     
      //add it to the AddOns chain
      _addOnsChain.addToList(addonClassLoader);
View Full Code Here

Examples of com.sun.appserv.server.util.ASURLClassLoader

    private static void setupSharedChain(){
        final List<String> sharedChainJarList = _getSharedClasspathInternal();
        logFine("shared classpath jars : " + sharedChainJarList + "\n");
        final URL[] urls = getURLList(sharedChainJarList);
        logFine(" SharedChain URL List " + urls);
         _sharedClassLoader = new ASURLClassLoader(urls,
                         ClassLoader.getSystemClassLoader());
        _sharedClassLoader.setName("Shared ClassLoader Chain");
    }
View Full Code Here

Examples of com.sun.appserv.server.util.ASURLClassLoader

        _optionalChain = new ClassLoaderChain(_addOnsChain);
        _optionalChain.setName("optionalChain");
       
        final URL[] urls = getURLList(_optionalClasspath);
        //Parent set to Shared Chain
        final ASURLClassLoader optionalJarsLoader = new ASURLClassLoader(urls,
                                                                _addOnsChain);
        _optionalChain.addToList(optionalJarsLoader);

    }
View Full Code Here

Examples of com.sun.appserv.server.util.ASURLClassLoader

       
        //parent set to Shared Chain
        _asChain = new ClassLoaderChain(_addOnsChain);
        _asChain.setName("ASChain");
       
        final ASURLClassLoader asimplloader = new ASURLClassLoader(urls, _asChain);
        asimplloader.setName("asimpl");
        _asChain.addToList(asimplloader);
        _asChain.addToList(_optionalChain);       
    }
View Full Code Here

Examples of com.sun.enterprise.loader.ASURLClassLoader

     * @return ClassLoader
     * @throws IOException
     */
    protected ClassLoader createClassLoader()
            throws IOException {
        ASURLClassLoader ASURLClassLoader = new ASURLClassLoader(webd.getClassLoader());
        ASURLClassLoader.appendURL(jspOutDir);
        return ASURLClassLoader;
    }
View Full Code Here

Examples of com.sun.enterprise.loader.ASURLClassLoader

        // but I handle everything that looks like a jar...  
        return true;
    }

    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        ASURLClassLoader cloader = AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>() {
            @Override
            public ASURLClassLoader run() {
                return new ASURLClassLoader(parent);
            }
        });

        try {             
            String compatProp = context.getAppProps().getProperty(
                DeploymentProperties.COMPATIBILITY);
            // if user does not specify the compatibility property
            // let's see if it's defined in glassfish-ejb-jar.xml
            if (compatProp == null) {
                GFEjbJarXMLParser gfEjbJarXMLParser =
                    new GFEjbJarXMLParser(context.getSourceDir());
                compatProp = gfEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                        DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if user does not specify the compatibility property
            // let's see if it's defined in sun-ejb-jar.xml
            if (compatProp == null) {
                SunEjbJarXMLParser sunEjbJarXMLParser =
                    new SunEjbJarXMLParser(context.getSourceDir());
                compatProp = sunEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                        DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if the compatibility property is set to "v2", we should add
            // all the jars under the ejb module root to maintain backward
            // compatibility of v2 jar visibility
            if (compatProp != null && compatProp.equals("v2")) {
                List<URL> moduleRootLibraries =
                    ASClassLoaderUtil.getURLsAsList(null,
                    new File[] {context.getSourceDir()}, true);
                for (URL url : moduleRootLibraries) {
                    cloader.addURL(url);
                }
            }

            cloader.addURL(context.getSource().getURI().toURL());
            cloader.addURL(context.getScratchDir("ejb").toURI().toURL());
            // add libraries referenced from manifest
            for (URL url : getManifestLibraries(context)) {
                cloader.addURL(url);
            }
        } catch(Exception e) {
            _logger.log(Level.SEVERE, e.getMessage());
            return null;
        }
View Full Code Here

Examples of com.sun.enterprise.loader.ASURLClassLoader

        }
        return versionIdentifier;
    }

    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        ASURLClassLoader cloader = AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>() {
            @Override
            public ASURLClassLoader run() {
                return new ASURLClassLoader(parent);
            }
        });

        try {
            String compatProp = context.getAppProps().getProperty(
                    DeploymentProperties.COMPATIBILITY);
            // if user does not specify the compatibility property
            // let's see if it's defined in glassfish-ejb-jar.xml
            if (compatProp == null) {
                GFEjbJarXMLParser gfEjbJarXMLParser =
                        new GFEjbJarXMLParser(context.getSource());
                compatProp = gfEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                            DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if user does not specify the compatibility property
            // let's see if it's defined in sun-ejb-jar.xml
            if (compatProp == null) {
                SunEjbJarXMLParser sunEjbJarXMLParser =
                        new SunEjbJarXMLParser(context.getSourceDir());
                compatProp = sunEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                            DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if the compatibility property is set to "v2", we should add
            // all the jars under the ejb module root to maintain backward
            // compatibility of v2 jar visibility
            if (compatProp != null && compatProp.equals("v2")) {
                List<URL> moduleRootLibraries =
                        ASClassLoaderUtil.getURLsAsList(null,
                                new File[]{context.getSourceDir()}, true);
                for (URL url : moduleRootLibraries) {
                    cloader.addURL(url);
                }
            }

            cloader.addURL(context.getSource().getURI().toURL());
            cloader.addURL(context.getScratchDir("ejb").toURI().toURL());
            // add libraries referenced from manifest
            for (URL url : getManifestLibraries(context)) {
                cloader.addURL(url);
            }

            try {
                final DeploymentContext dc = context;
                final ClassLoader cl = cloader;
View Full Code Here

Examples of com.sun.enterprise.loader.ASURLClassLoader

        }
        return versionIdentifier;
    }

    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        ASURLClassLoader cloader = AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>() {
            @Override
            public ASURLClassLoader run() {
                return new ASURLClassLoader(parent);
            }
        });

        try {
            String compatProp = context.getAppProps().getProperty(
                    DeploymentProperties.COMPATIBILITY);
            // if user does not specify the compatibility property
            // let's see if it's defined in glassfish-ejb-jar.xml
            if (compatProp == null) {
                GFEjbJarXMLParser gfEjbJarXMLParser =
                        new GFEjbJarXMLParser(context.getSource());
                compatProp = gfEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                            DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if user does not specify the compatibility property
            // let's see if it's defined in sun-ejb-jar.xml
            if (compatProp == null) {
                SunEjbJarXMLParser sunEjbJarXMLParser =
                        new SunEjbJarXMLParser(context.getSourceDir());
                compatProp = sunEjbJarXMLParser.getCompatibilityValue();
                if (compatProp != null) {
                    context.getAppProps().put(
                            DeploymentProperties.COMPATIBILITY, compatProp);
                }
            }

            // if the compatibility property is set to "v2", we should add
            // all the jars under the ejb module root to maintain backward
            // compatibility of v2 jar visibility
            if (compatProp != null && compatProp.equals("v2")) {
                List<URL> moduleRootLibraries =
                        ASClassLoaderUtil.getURLsAsList(null,
                                new File[]{context.getSourceDir()}, true);
                for (URL url : moduleRootLibraries) {
                    cloader.addURL(url);
                }
            }

            cloader.addURL(context.getSource().getURI().toURL());
            cloader.addURL(context.getScratchDir("ejb").toURI().toURL());
            // add libraries referenced from manifest
            for (URL url : getManifestLibraries(context)) {
                cloader.addURL(url);
            }

            try {
                final DeploymentContext dc = context;
                final ClassLoader cl = cloader;
View Full Code Here

Examples of com.sun.enterprise.loader.ASURLClassLoader

        return detector.handles(archive);
    }

    @Override
    public ClassLoader getClassLoader(final ClassLoader parent, DeploymentContext context) {
        ASURLClassLoader cloader = AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>() {
            @Override
            public ASURLClassLoader run() {
                return new ASURLClassLoader(parent);
            }
        });
        try {
            cloader.addURL(context.getSource().getURI().toURL());
            // add libraries referenced from manifest
            for (URL url : getManifestLibraries(context)) {
                cloader.addURL(url);
            }
                      
            try {
                final DeploymentContext dc = context;
                final ClassLoader cl = cloader;
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.