Examples of DeploymentClassLoader


Examples of org.apache.axis2.deployment.DeploymentClassLoader

            deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
                    (File) cfgCtx.getAxisConfiguration().getParameterValue(
                            Constants.Configuration.ARTIFACTS_TEMP_DIR),
                    cfgCtx.getAxisConfiguration().isChildFirstClassLoading());

            DeploymentClassLoader urlCl
                = (DeploymentClassLoader)deploymentFileData.getClassLoader();
            Thread.currentThread().setContextClassLoader(urlCl);

            // StartupFactory registration
            for (StartupFactory factory : getProviders(StartupFactory.class, urlCl)) {
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

            boolean isDirectory = deploymentFileData.getFile().isDirectory();
            deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
                    (File) cfgCtx.getAxisConfiguration().getParameterValue(
                            Constants.Configuration.ARTIFACTS_TEMP_DIR));

            DeploymentClassLoader urlCl
                = (DeploymentClassLoader)deploymentFileData.getClassLoader();
            Thread.currentThread().setContextClassLoader(urlCl);

            // StartupFactory registration
            for (StartupFactory factory : getProviders(StartupFactory.class, urlCl)) {
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

        // get the context class loader for the later restore of the context class loader
        ClassLoader prevCl = Thread.currentThread().getContextClassLoader();

        try {

            DeploymentClassLoader urlCl = new DeploymentClassLoader(
                    new URL[]{deploymentFileData.getFile().toURL()}, null, prevCl);
            Thread.currentThread().setContextClassLoader(urlCl);

            // MediatorFactory registration
            URL facURL = urlCl.findResource(
                    "META-INF/services/org.apache.synapse.config.xml.MediatorFactory");
            if (facURL != null) {
                InputStream facStream = facURL.openStream();
                InputStreamReader facreader = new InputStreamReader(facStream);

                StringBuffer facSB = new StringBuffer();
                int c;
                while ((c = facreader.read()) != -1) {
                    facSB.append((char) c);
                }

                String[] facClassName = facSB.toString().split("\n");
                for (int i=0; i<facClassName.length; i++) {
                    log.info("Registering the Mediator factory: " + facClassName[i]);
                    Class facClass = urlCl.loadClass(facClassName[i]);
                    MediatorFactory facInst = (MediatorFactory) facClass.newInstance();
                    MediatorFactoryFinder.getInstance()
                            .getFactoryMap().put(facInst.getTagQName(), facClass);
                    log.info("Mediator loaded and registered for " +
                            "the tag name: " + facInst.getTagQName());
                }
            } else {
                handleException("Unable to find the MediatorFactory implementation. " +
                        "Unable to register the MediatorFactory with the FactoryFinder");
            }

            // MediatorSerializer registration
            URL serURL = urlCl.findResource(
                    "META-INF/services/org.apache.synapse.config.xml.MediatorSerializer");
            if (serURL != null) {
                InputStream serStream = serURL.openStream();
                InputStreamReader serReader = new InputStreamReader(serStream);

                StringBuffer serSB = new StringBuffer();
                int c;
                while ((c = serReader.read()) != -1) {
                    serSB.append((char) c);
                }

                String[] serClassName = serSB.toString().split("\n");
                for (int i=0; i<serClassName.length; i++) {
                    log.info("Registering the Mediator serializer: " + serClassName[i]);
                    Class serClass = urlCl.loadClass(serClassName[i]);
                    MediatorSerializer serInst = (MediatorSerializer) serClass.newInstance();
                    MediatorSerializerFinder.getInstance()
                            .getSerializerMap().put(serInst.getMediatorClassName(), serInst);
                    log.info("Mediator loaded and registered for " +
                            "the serialization as: " + serInst.getMediatorClassName());
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

                    .doPrivileged(new PrivilegedAction() {
                        public Object run() {
                            if (useJarFileClassLoader()) {
                                return new JarFileClassLoader(urllist, parent);
                            } else {
                                return new DeploymentClassLoader(urllist, null, parent, isChildFirstClassLoading);
                            }
                        }
                    });
            return classLoader;
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

            final URL[] urls, final ClassLoader serviceClassLoader,
            final List embeddedJars, final boolean isChildFirstClassLoading) {
        return (DeploymentClassLoader)AccessController
                .doPrivileged(new PrivilegedAction() {
                    public Object run() {
                        return new DeploymentClassLoader(urls, embeddedJars,
                                                         serviceClassLoader, isChildFirstClassLoading);
                    }
                });
    }
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

            deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
                    (File) cfgCtx.getAxisConfiguration().getParameterValue(
                            Constants.Configuration.ARTIFACTS_TEMP_DIR),
                    cfgCtx.getAxisConfiguration().isChildFirstClassLoading());

            DeploymentClassLoader urlCl
                = (DeploymentClassLoader)deploymentFileData.getClassLoader();
            Thread.currentThread().setContextClassLoader(urlCl);

            // StartupFactory registration
            for (StartupFactory factory : getProviders(StartupFactory.class, urlCl)) {
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

                    .doPrivileged(new PrivilegedAction() {
                        public Object run() {
                            if (useJarFileClassLoader()) {
                                return new JarFileClassLoader(urllist, parent);
                            } else {
                                return new DeploymentClassLoader(urllist, null, parent, isChildFirstClassLoading);
                            }
                        }
                    });
            return classLoader;
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

            final URL[] urls, final ClassLoader serviceClassLoader,
            final List embeddedJars, final boolean isChildFirstClassLoading) {
        return (DeploymentClassLoader)AccessController
                .doPrivileged(new PrivilegedAction() {
                    public Object run() {
                        return new DeploymentClassLoader(urls, embeddedJars,
                                                         serviceClassLoader, isChildFirstClassLoading);
                    }
                });
    }
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

      final URL[] urls, final ClassLoader serviceClassLoader,
      final List embeddedJars) {
    return (DeploymentClassLoader) AccessController
        .doPrivileged(new PrivilegedAction() {
          public Object run() {
            return new DeploymentClassLoader(urls, embeddedJars,
                serviceClassLoader);
          }
        });
  }
View Full Code Here

Examples of org.apache.axis2.deployment.DeploymentClassLoader

                    .doPrivileged(new PrivilegedAction() {
                        public Object run() {
                            if (useJarFileClassLoader()) {
                                return new JarFileClassLoader(urllist, parent);
                            } else {
                                return new DeploymentClassLoader(urllist, null, parent, isChildFirstClassLoading);
                            }
                        }
                    });
            return classLoader;
        } catch (MalformedURLException e) {
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.