Examples of DynamicClassLoader


Examples of com.bj58.spat.gaea.server.deploy.hotdeploy.DynamicClassLoader

 
  @SuppressWarnings("rawtypes")
  @Test
  public void testGetContractInfo() throws Exception {
    DynamicClassLoader classLoader = new DynamicClassLoader();
    classLoader.addFolder(jarPath);
    ContractInfo ci = ScanClass.getContractInfo(jarPath, classLoader);
    for(SessionBean sb : ci.getSessionBeanList()) {
     
      Assert.assertEquals("com.bj58.spat.servicedemo.contract.INewsService", sb.getInterfaceName());
     
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

   * Returns true if the server has been modified and needs restarting.
   */
  @Override
  public boolean isModified()
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.isModified();
    else
      return true;
  }
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

  }
 
  @Override
  public boolean logModified(Logger log)
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.logModified(log);
    else {
      log.info(this + " is closed");

      return true;
    }
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

  /**
   * Returns true if the server has been modified and needs restarting.
   */
  public boolean isModifiedNow()
  {
    DynamicClassLoader classLoader = getClassLoader();
   
    if (classLoader != null)
      return classLoader.isModifiedNow();
    else
      return true;
  }
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

  public void init(FilterConfig config)
    throws ServletException
  {
    _stylePath = new MergePath();
    _stylePath.addMergePath(Vfs.lookup());
    DynamicClassLoader loader;
    loader = (DynamicClassLoader) Thread.currentThread().getContextClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    _stylePath.addClassPath(resourcePath);

    _application = config.getServletContext();

    if ("true".equals(config.getInitParameter("unconditional")))
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

    throws Exception
  {
    ClassLoader parentLoader = getParentLoader();
   
    if (parentLoader instanceof DynamicClassLoader) {
      DynamicClassLoader dcl = (DynamicClassLoader) parentLoader;

      dcl.make();
    }

    Path workPath = getClassDir();

    _cl = beanClass;
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

   * Adds any class path from the manifest.
   */
  protected void addManifestClassPath()
    throws IOException
  {
    DynamicClassLoader loader = Environment.getDynamicClassLoader();

    if (loader == null)
      return;

    Manifest manifest = getManifest();

    if (manifest == null)
      return;

    Attributes main = manifest.getMainAttributes();

    if (main == null)
      return;

    String classPath = main.getValue("Class-Path");

    Path pwd = null;

    if (getArchivePath() != null)
      pwd = getArchivePath().getParent();
    else
      pwd = getRootDirectory();

    if (classPath == null) {
    }
    else if (_manifestLoader != null)
      _manifestLoader.addManifestClassPath(classPath, pwd);
    else
      loader.addManifestClassPath(classPath, pwd);
  }
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

               ClassLoader parentLoader,
               Path appDir,
               ServletConfig config)
    throws Exception
  {
    DynamicClassLoader loader;

    String fullClassName = className;
    String mangledName = fullClassName.replace('.', '/');

    Path classPath = getClassDir().lookup(mangledName + ".class");
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

    if (_loader == null)
      loader = _systemClassLoader;

    ArrayList<String> pkgList = loadPackageList(pkg);
   
    DynamicClassLoader dynLoader = null;
   
    if (loader instanceof DynamicClassLoader)
      dynLoader = (DynamicClassLoader) loader;

    for (String pkgName : pkgList) {
      try {
        Class<?> cl;
       
        if (dynLoader != null)
          cl = dynLoader.loadClassImpl(pkgName + '.' + name, false);
        else
          cl = Class.forName(pkgName + '.' + name, false, loader);

        if (cl != null)
          return cl;
View Full Code Here

Examples of com.caucho.loader.DynamicClassLoader

      }

      if (_classLoader != null)
        _classLoader.getNewTempClassLoader();
      else
        new DynamicClassLoader(null);
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }
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.