Package org.openbravo.utils

Examples of org.openbravo.utils.ServerConnection


  @Override
  public void execute() throws BuildException {
    final File f = new File("src-diagnostics/build.xml");
    final String fileName = f.getAbsolutePath();
    log4j.info("Checking tomcat's user file permissions...");
    final String result = new ServerConnection().getCheck("ant", "&file=" + fileName
        + "&task=check.permissions");
    if (result.equals("OK"))
      log4j.info("Tomcat's user permissions. OK");
    else
      throw new BuildException("Tomcat's user do not have read/write permissions in all files");
View Full Code Here


  @Override
  public void execute() throws BuildException {
    log4j.info("Checking Tomcat's JVM version...");

    final String jvmVersion = new ServerConnection().getCheck("jvm-version");
    final String minJvmVersion = new PropertiesManager().getProperty("jvm-version");

    final String msg = "Current Tomcat's JVM version: " + jvmVersion
        + " minimum required version: " + minJvmVersion;
View Full Code Here

  static Logger log4j = Logger.getLogger(CheckTomcatVersion.class);

  @Override
  public void execute() throws BuildException {
    log4j.info("Checking tomcat version...");
    final String versionString = new ServerConnection().getCheck("server");
    if (!versionString.contains("Tomcat"))
      throw new BuildException("Server seems not to be Tomcat");
    final String version = Version.getVersion(versionString);
    final String minVersion = new PropertiesManager().getProperty("tomcat.version");
    final String msg = "Minimum Tomcat version: " + minVersion + ", current version: " + version;
View Full Code Here

  @Override
  public void execute() throws BuildException {
    final File f = new File("src-diagnostics/build.xml");
    final String fileName = f.getAbsolutePath();
    log4j.info("Checking tomcat's user has X...");
    final String result = new ServerConnection().getCheck("ant", "&file=" + fileName
        + "&task=compile.web");
    if (result.equals("OK"))
      log4j.info("Tomcat's user X. OK");
    else {
      if (result.contains("X11"))
View Full Code Here

  public void execute() throws BuildException {
    final File f = new File("src-diagnostics/build.xml");
    final String fileName = f.getAbsolutePath().replace("\\", "/");
    System.out.println(fileName);
    log4j.info("Checking tomcat executing ant tasks...");
    String result = new ServerConnection().getCheck("ant", "&file=" + fileName + "&task=test1");
    if (result.equals("OK"))
      log4j.info("Possible to execute simple tasks. OK");
    else
      throw new BuildException("Tomcat cannot execute simple ant tasks: " + result);

    result = new ServerConnection().getCheck("ant", "&file=" + fileName + "&task=test2");
    if (result.equals("OK"))
      log4j.info("Possible to execute ant javac task. OK");
    else
      throw new BuildException("Tomcat cannot execute ant javac task: " + result
          + "Tip: check http://wiki.openbravo.com/wiki/Development_Stack_Setup#Apache_Tomcat");
View Full Code Here

  static Logger log4j = Logger.getLogger(CheckTomcatMemory.class);

  @Override
  public void execute() throws BuildException {
    log4j.info("Checking tomcat's memory...");
    final long maxCurrentMemory = new Long(new ServerConnection().getCheck("memory"));
    final long MaxMemory = new Long(new PropertiesManager().getProperty("max.memory"));
    final String msg = "Current max memory in server:" + maxCurrentMemory + "M, minimum required:"
        + MaxMemory + "M";

    // check max memory +- 5%, because it is not accurate
View Full Code Here

TOP

Related Classes of org.openbravo.utils.ServerConnection

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.