Examples of DeploymentClassLoader


Examples of org.apache.axis2.deployment.DeploymentClassLoader

                    if (!file.exists()) {
                        throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND,
                                file.getAbsolutePath()));
                    }
                    urlsToLoadFrom = new URL[]{file.toURL()};
                    classLoader = new DeploymentClassLoader(urlsToLoadFrom, parent, lock);
                } catch (Exception e) {
                    throw new AxisFault(e);
                }
            }
        } else {
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

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

                    throw new RuntimeException("file not found !!!!!!!!!!!!!!!");
                }
                URLs.add(file.toURL());
                urlsToLoadFrom = new URL[]{file.toURL()};
                classLoader =
                        new DeploymentClassLoader(urlsToLoadFrom, parent);
//                classLoader = new URLClassLoader(urlsToLoadFrom, parent);
            } catch (Exception e) {
                throw new AxisFault(e);
            }
        }
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[] facClassNames = facSB.toString().split("\n");
                for (String facClassName : facClassNames) {
                    log.info("Registering the Mediator factory: " + facClassName);
                    Class facClass = urlCl.loadClass(facClassName);
                    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[] serClassNames = serSB.toString().split("\n");
                for (String serClassName : serClassNames) {
                    log.info("Registering the Mediator serializer: " + serClassName);
                    Class serClass = urlCl.loadClass(serClassName);
                    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

    public static ClassLoader createClassLoader(URL[] urls, ClassLoader serviceClassLoader,
                                                boolean extractJars, File tmpDir) {
        if(extractJars) {
            URL[] urls1 = Utils.getURLsForAllJars(urls[0], tmpDir);
            return new DeploymentClassLoader(urls1, null, serviceClassLoader);
        } else {
            List embedded_jars = Utils.findLibJars(urls[0]);
            return new DeploymentClassLoader(urls, embedded_jars, serviceClassLoader);
        }
    }
View Full Code Here

Examples of org.jbpm.pvm.internal.repository.DeploymentClassLoader

    Thread currentThread = Thread.currentThread();
    ClassLoader original = currentThread.getContextClassLoader();

    RepositoryCache repositoryCache = EnvironmentImpl.getFromCurrent(RepositoryCache.class);
    DeploymentClassLoader deploymentClassLoader = repositoryCache.getDeploymentClassLoader(deploymentId, original);
    if (deploymentClassLoader==null) {
      deploymentClassLoader = new DeploymentClassLoader(original, deploymentId);
      repositoryCache.setDeploymentClassLoader(deploymentId, original, deploymentClassLoader);
    }
   
    currentThread.setContextClassLoader(deploymentClassLoader);
   
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.