Examples of JarInstaller


Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

  // byte[] clientCode = null;
  String clientCode = null;
  Log.print(this,localStrings.getLocalString(
    "enterprise.tools.deployment.main.deploytool.deploy_command",
    "Deploy {0} on {1}", msg));
  JarInstaller backend = this.getServerManager().getServerForName(serverName);
  DeploymentSession deploymentSessionToUse = null;
  if (deploymentSession == null) {
      deploymentSessionToUse = this.getServerManager().createDeploymentSession(serverName);
  } else {
      deploymentSessionToUse = deploymentSession;
  }
 
  FileInputStream fis = new FileInputStream(appArchiveFile);
  DataInputStream dis = new DataInputStream(fis);
  byte[] jarData = new byte[(int) appArchiveFile.length()];
  dis.readFully(jarData);
  dis.close();
  fis.close();
  clientCode = backend.deployApplication(jarData, applicationName, deploymentSessionToUse);
  Log.print(this, localStrings.getLocalString(
                "enterprise.tools.deployment.main.clientcodeat",
                "client code at {0}", new Object[] {clientCode}));
  if (clientCode != null && clientCodeFile != null) {
      writeClientJarToFile(clientCode, clientCodeFile);
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    }

    public static void listApplications(String serverName) {
        try {
          DeployTool deployTool = new DeployTool(false);
            JarInstaller backend = deployTool.getServerManager().getServerForName(serverName);
            Vector deployedApps = backend.getApplicationNames();
            if( deployedApps.size() > 0 ) {
                System.out.println(localStrings.getLocalString
                        ("enterprise.tools.deployment.main.followingapps",
                                "The following apps are deployed on {0}:",
                                new Object[] {serverName}));
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    /** The undeploy method.*/
    public void undeployApplication(String applicationName, String serverName)
        throws ServerException
    {
  JarInstaller installer = this.getJarInstaller(serverName);
  try {
      installer.undeployApplication(applicationName);
      this.changed(APP_UNDEPLOYED, applicationName);
  } catch (Throwable t) {
      throw new ServerException(localStrings.getLocalString(
      "enterprise.tools.deployment.main.erroruninstallingapplicationfromserver",
    "Error uninstalling {0} from {1}",
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    */

    public void undeployConnector(String rarName, String serverName)
        throws ServerException
    {
  JarInstaller installer = this.getJarInstaller(serverName);
  try {
      installer.undeployConnector(rarName);
      this.changed(SA_UNDEPLOYED, rarName);
  } catch (Throwable t) {
      throw new ServerException(localStrings.getLocalString(
      "enterprise.tools.deployment.main.erroruninstallingapplicationfromserver",
    "Error uninstalling {0} from {1}",
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    /** Connect to a new server by hostnamne*/
    public void addServer(String serverName)
  throws ServerException
    {
  JarInstaller jarInstaller = this.getJarInstaller(serverName);
  if (serverNameToListenerMap.containsKey(serverName)) {
      // already present
      this.setCurrentServer(serverName);
      this.changed(SERVER_SELECTED, serverName);
  } else {
      ServerListener serverListener = null;
      try {
    serverListener = this.createServerListener(serverName);
    jarInstaller.addRemoteNotificationListener(serverListener);
      } catch (Exception e) {
    System.out.println(localStrings.getLocalString(
                  "enterprise.tools.deployment.main.errorgettingserverlistener",
      "Error getting server listener"));
      }
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    if ((this.getCurrentServer() != null) &&
                    this.getCurrentServer().equals(hostName)) {
        this.currentServer = null;
    }
    this.changed(SERVER_REMOVED, hostName);
    JarInstaller jarInstaller = this.getJarInstaller(hostName);
    jarInstaller.removeRemoteNotificationListener(serverListener);
      } catch (Exception e) {
    // leave for debug
    //System.out.println("Error removing notification listener from server");
      }
  }
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    }
   
    public boolean isInstalled(String applicationName, String serverName)
  throws ServerException
    {
  JarInstaller installer = this.getJarInstaller(serverName);
  if (installer != null) {
      try {
    Vector applicationNames = installer.getApplicationNames();
    for (int i = 0; i < applicationNames.size(); i++) {
        if (applicationName.equals(applicationNames.elementAt(i))) {
      return true;
        }
    }
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

     {
  Vector v = null;
  if (serverName == null) {
      return v;
  }
  JarInstaller installer = this.getJarInstaller(serverName);
  if (installer != null) {
      try {
    v = installer.getApplicationNames();
      } catch (RemoteException re) {
    throw new ServerException(localStrings.getLocalString(  
     "enterprise.tools.deployment.main.errorgettingappnamefromserverwithreason",
        "Error obtaining application names from {0} \n reason {1}",
                    new Object[] {serverName,re.getMessage()}));
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    public Vector getConnectorNamesForServer(String serverName)
  throws ServerException
    {
  Vector v = null;
  if (serverName != null) {
      JarInstaller installer = this.getJarInstaller(serverName);
      if (installer != null) {
          try {
        v = new Vector();
            ConnectorInfo ci = installer.listConnectors();
            for (int i = 0; i < ci.connectors.length; i++) {
          v.add(ci.connectors[i].toString());
                    }
        } catch (Exception re) {
        throw new ServerException(
View Full Code Here

Examples of com.sun.enterprise.tools.deployment.backend.JarInstaller

    public Vector getConnectionFactoriesForServer(String serverName)
  throws ServerException
    {
  Vector v = null;
  if (serverName != null) {
      JarInstaller installer = this.getJarInstaller(serverName);
      if (installer != null) {
          try {
        v = new Vector();
            ConnectorInfo ci = installer.listConnectors();
            for (int i = 0; i < ci.connectionFactories.length; i++) {
          v.add(ci.connectionFactories[i].toString());
                    }
        } catch (Exception re) {
        throw new ServerException(localStrings.getLocalString(  
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.