Package org.apache.cocoon.components.classloader

Examples of org.apache.cocoon.components.classloader.ClassLoaderManager


  }

  public void configure(Configuration configuration) throws ConfigurationException {
    Configuration clazzConf = configuration.getChild("class");
    if (clazzConf != null) {
      ClassLoaderManager clazzLoader = null;
      try {
        String clazzName = clazzConf.getValue();
        String mappingURI = clazzConf.getAttribute("mapping");

        if (mappingURI != null) {
          mapping = new Mapping();
          // resolve
          //mapping.loadMapping(getFile(resolver,mappingURI));
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] mapping [" + String.valueOf(mappingURI) + "]");
        }
        else {
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] using default mapping");
        }

        clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
        Class clazz = clazzLoader.loadClass(clazzName);
        setBean(clazz.newInstance());
      }
      catch (ComponentException e) {
        throw new ConfigurationException("", e);
      }
View Full Code Here


    }

    public void configure(Configuration configuration) throws ConfigurationException {
        Configuration clazzConf = configuration.getChild("class", false);
        if (clazzConf != null) {
            ClassLoaderManager clazzLoader = null;
            try {
                String clazzName = clazzConf.getValue();
                String mappingURI = clazzConf.getAttribute("mapping");

                if (mappingURI != null) {
                    mapping = new Mapping();
                    // resolve
                    //mapping.loadMapping(getFile(resolver,mappingURI));
                    getLogger().debug("bean class = [" + clazzName + "] mapping [" + mappingURI + "]");
                } else {
                    getLogger().debug("bean class = [" + clazzName + "] using default mapping");
                }

                clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
                Class clazz = clazzLoader.loadClass(clazzName);
                setBean(clazz.newInstance());
            } catch (ServiceException e) {
                throw new ConfigurationException("", e);
            } catch (ClassNotFoundException e) {
                throw new ConfigurationException("", e);
View Full Code Here

  }

  public void configure(Configuration configuration) throws ConfigurationException {
    Configuration clazzConf = configuration.getChild("class");
    if (clazzConf != null) {
      ClassLoaderManager clazzLoader = null;
      try {
        String clazzName = clazzConf.getValue();
        String mappingURI = clazzConf.getAttribute("mapping");

        if (mappingURI != null) {
          mapping = new Mapping();
          // resolve
          //mapping.loadMapping(getFile(resolver,mappingURI));
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] mapping [" + String.valueOf(mappingURI) + "]");
        }
        else {
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] using default mapping");
        }

        clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
        Class clazz = clazzLoader.loadClass(clazzName);
        setBean(clazz.newInstance());
      }
      catch (ComponentException e) {
        throw new ConfigurationException("", e);
      }
View Full Code Here

    }

    public void configure(Configuration configuration) throws ConfigurationException {
        Configuration clazzConf = configuration.getChild("class", false);
        if (clazzConf != null) {
            ClassLoaderManager clazzLoader = null;
            try {
                String clazzName = clazzConf.getValue();
                String mappingURI = clazzConf.getAttribute("mapping");

                if (mappingURI != null) {
                    mapping = new Mapping();
                    // resolve
                    //mapping.loadMapping(getFile(resolver,mappingURI));
                    getLogger().debug("bean class = [" + clazzName + "] mapping [" + mappingURI + "]");
                } else {
                    getLogger().debug("bean class = [" + clazzName + "] using default mapping");
                }

                clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
                Class clazz = clazzLoader.loadClass(clazzName);
                setBean(clazz.newInstance());
            } catch (ComponentException e) {
                throw new ConfigurationException("", e);
            } catch (ClassNotFoundException e) {
                throw new ConfigurationException("", e);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.classloader.ClassLoaderManager

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.