Package com.caucho.j2ee.deployclient

Examples of com.caucho.j2ee.deployclient.TargetImpl


    TargetImpl[] targets = new TargetImpl[hosts.size()];
    for (int i = 0; i < hosts.size(); i++) {
      String host = hosts.get(i);
      String description = "Virtual Host: " + host;
     
      targets[i] = new TargetImpl(host, description);
    }

    return targets;
  }
View Full Code Here


    Path archivePath = null;

    Throwable exception = null;

    TargetImpl childTarget = new TargetImpl(moduleID, "");
   
    TargetModuleIDImpl childModuleID
      = new TargetModuleIDImpl(childTarget, moduleID);
   
    if (mxbean != null) {
      try {
        Path deployPath = Vfs.lookup(mxbean.getArchivePath(name));

        deployPath.getParent().mkdirs();

        if (archivePath == null) {
          createArchive(deployPath, plan, archiveIs);
          archivePath = deployPath;
        }
        else {
          WriteStream deployStream = deployPath.openWrite();

          try {
            deployStream.writeFile(archivePath);
          }
          finally {
            deployStream.close();
          }
        }

        mxbean.update();

        exception = mxbean.getConfigException(name);
      }
      catch (Exception e) {
        if (log.isLoggable(Level.INFO))
          log.log(Level.INFO, e.toString(), e);

        exception = e;
      }

      if (exception != null) {
        failed = true;
        describe(message, childModuleID, false, getExceptionMessage(exception));

        /*
          if (mxbean != null) {
          try {
          mxbean.undeploy(moduleID);
          }
          catch (Throwable t) {
          log.log(Level.FINE, t.toString(), t);
          }
          }
        */
      }
      else {
        if ("ear".equals(plan.getArchiveType())) {
          try {
            EAppMXBean eApp = (EAppMXBean) Jmx.find(moduleID);

            if (eApp != null)
              childTarget.setClientRefs(eApp.getClientRefs());
          } catch (Exception e) {
            log.log(Level.FINEST, e.toString(), e);
          }
        }

View Full Code Here

    TargetImpl[] targets = new TargetImpl[hosts.size()];
    for (int i = 0; i < hosts.size(); i++) {
      String host = hosts.get(i);
      String description = "Virtual Host: " + host;
     
      targets[i] = new TargetImpl(host, description);
    }

    return targets;
  }
View Full Code Here

    Path archivePath = null;

    Throwable exception = null;

    TargetImpl childTarget = new TargetImpl(moduleID, "");
   
    TargetModuleIDImpl childModuleID
      = new TargetModuleIDImpl(childTarget, moduleID);
   
    if (mxbean != null) {
      try {
  Path deployPath = Vfs.lookup(mxbean.getArchivePath(name));

  deployPath.getParent().mkdirs();

  if (archivePath == null) {
    createArchive(deployPath, plan, archiveIs);
    archivePath = deployPath;
  }
  else {
    WriteStream deployStream = deployPath.openWrite();

    try {
      deployStream.writeFile(archivePath);
    }
    finally {
      deployStream.close();
    }
  }

  mxbean.update();

  exception = mxbean.getConfigException(name);
      }
      catch (Exception e) {
  if (log.isLoggable(Level.INFO))
    log.log(Level.INFO, e.toString(), e);

  exception = e;
      }

      if (exception != null) {
  failed = true;
  describe(message, childModuleID, false, getExceptionMessage(exception));

  /*
    if (mxbean != null) {
    try {
    mxbean.undeploy(moduleID);
    }
    catch (Throwable t) {
    log.log(Level.FINE, t.toString(), t);
    }
    }
  */
      }
      else {
  if ("ear".equals(plan.getArchiveType())) {
    try {
      EAppMXBean eApp = (EAppMXBean) Jmx.find(moduleID);

      if (eApp != null)
        childTarget.setClientRefs(eApp.getClientRefs());
    } catch (Exception e) {
      log.log(Level.FINEST, e.toString(), e);
    }
  }

View Full Code Here

TOP

Related Classes of com.caucho.j2ee.deployclient.TargetImpl

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.