Examples of addLoader()


Examples of com.caucho.loader.DynamicClassLoader.addLoader()

      WebApp app = getWebApp();
      if (app != null && ! hasConf) {
        Path appDir = app.getRootDirectory();

        DynamicClassLoader dynLoader = app.getEnvironmentClassLoader();
        dynLoader.addLoader(new CompilingLoader(dynLoader, appDir.lookup("WEB-INF/classes")));
        dynLoader.addLoader(new DirectoryLoader(dynLoader, appDir.lookup("WEB-INF/lib")));

        Path webXml = appDir.lookup("WEB-INF/web.xml");

        if (webXml.canRead()) {
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader.addLoader()

      if (app != null && ! hasConf) {
        Path appDir = app.getRootDirectory();

        DynamicClassLoader dynLoader = app.getEnvironmentClassLoader();
        dynLoader.addLoader(new CompilingLoader(dynLoader, appDir.lookup("WEB-INF/classes")));
        dynLoader.addLoader(new DirectoryLoader(dynLoader, appDir.lookup("WEB-INF/lib")));

        Path webXml = appDir.lookup("WEB-INF/web.xml");

        if (webXml.canRead()) {
          try {
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader.addLoader()

      WebApp app = getWebApp();
      if (app != null && ! hasConf) {
  Path appDir = app.getAppDir();

  DynamicClassLoader dynLoader = app.getEnvironmentClassLoader();
  dynLoader.addLoader(new CompilingLoader(dynLoader, appDir.lookup("WEB-INF/classes")));
  dynLoader.addLoader(new DirectoryLoader(dynLoader, appDir.lookup("WEB-INF/lib")));

  Path webXml = appDir.lookup("WEB-INF/web.xml");

  if (webXml.canRead()) {
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader.addLoader()

      if (app != null && ! hasConf) {
  Path appDir = app.getAppDir();

  DynamicClassLoader dynLoader = app.getEnvironmentClassLoader();
  dynLoader.addLoader(new CompilingLoader(dynLoader, appDir.lookup("WEB-INF/classes")));
  dynLoader.addLoader(new DirectoryLoader(dynLoader, appDir.lookup("WEB-INF/lib")));

  Path webXml = appDir.lookup("WEB-INF/web.xml");

  if (webXml.canRead()) {
    try {
View Full Code Here

Examples of com.caucho.loader.EnvironmentClassLoader.addLoader()

    // wrap so the EJB code will work.
    EnvironmentClassLoader loader;

    loader = EnvironmentClassLoader.create(oldLoader);
    if (_appDir != null) {
      loader.addLoader(new SimpleLoader(loader,
                                        _appDir.lookup("WEB-INF/classes"),
                                        null));
    }

    Thread.currentThread().setContextClassLoader(loader);
View Full Code Here

Examples of com.caucho.loader.EnvironmentClassLoader.addLoader()

    // wrap so the EJB code will work.
    EnvironmentClassLoader loader;

    loader = EnvironmentClassLoader.create(oldLoader);
    if (_appDir != null) {
      loader.addLoader(new SimpleLoader(loader,
                                        _appDir.lookup("WEB-INF/classes"),
          null));
    }

    Thread.currentThread().setContextClassLoader(loader);
View Full Code Here

Examples of jst.TemplateContextImpl.addLoader()

public class EmbedTemplateTest {

    public static void main(String[] args) throws IOException {
        TemplateContextImpl context = new TemplateContextImpl();
        context.addLoader( new FileTemplateLoader( new File("./test") ) );
        ScriptRuntime runtime = context.load("/embedded-test.jst");
        Object output = runtime.addVariable("name", "Charlie").addVariable("age", 31).invoke();

        System.out.println( output );
    }
View Full Code Here

Examples of org.apache.cxf.common.util.ProxyClassLoader.addLoader()

    }
   
    @Test
    public void testCreateClientCustomLoader() throws Exception {
        ProxyClassLoader loader = new ProxyClassLoader(BookStore.class.getClassLoader());
        loader.addLoader(BookStore.class.getClassLoader());
       
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setAddress("http://bar");
        bean.setResourceClass(BookStore.class);
        bean.setClassLoader(loader);
View Full Code Here

Examples of org.apache.cxf.common.util.ProxyClassLoader.addLoader()

        if (proxy == null && isServletApiContext(type.getName())) {
            proxy = createThreadLocalServletApiContext(type.getName())
        }
        if (proxy == null) {
            ProxyClassLoader loader = new ProxyClassLoader(Proxy.class.getClassLoader());
            loader.addLoader(type.getClassLoader());
            loader.addLoader(ThreadLocalProxy.class.getClassLoader());
            return (ThreadLocalProxy<T>)Proxy.newProxyInstance(loader,
                                   new Class[] {type, ThreadLocalProxy.class },
                                   new ThreadLocalInvocationHandler<T>());
        }
View Full Code Here

Examples of org.apache.cxf.common.util.ProxyClassLoader.addLoader()

            proxy = createThreadLocalServletApiContext(type.getName())
        }
        if (proxy == null) {
            ProxyClassLoader loader = new ProxyClassLoader(Proxy.class.getClassLoader());
            loader.addLoader(type.getClassLoader());
            loader.addLoader(ThreadLocalProxy.class.getClassLoader());
            return (ThreadLocalProxy<T>)Proxy.newProxyInstance(loader,
                                   new Class[] {type, ThreadLocalProxy.class },
                                   new ThreadLocalInvocationHandler<T>());
        }
       
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.