Package sos.util

Examples of sos.util.SOSSchedulerLogger


  public boolean spooler_init() {
   
    try {
     
      try {
        this.logger = new SOSSchedulerLogger(this.spooler_log);
      } catch (Exception e) {
        throw new Exception("error occurred instantiating logger: " + e.getMessage());
      }
     
      return true;
View Full Code Here


  public boolean spooler_init() {
   
    try {
     
      try {
        this.logger = new SOSSchedulerLogger(this.spooler_log);
      } catch (Exception e) {
        throw new Exception("error occurred instantiating logger: " + e.getMessage());
      }
     
      return true;
View Full Code Here

    public boolean spooler_init() {
     
        ArrayList references = null;
       
        try {
            this.setLogger(new SOSSchedulerLogger(this.spooler.log()));

            try { // to initialize database connection
                this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
                this.setJobProperties(this.jobSettings.getSection("spooler"));

                if (this.getJobProperties().isEmpty())
                    throw new Exception("no settings found in section [spooler] of configuration file: " + spooler.ini_path());

                if (this.getJobProperties().getProperty("db") == null || this.getJobProperties().getProperty("db").length() == 0)
                    throw new Exception("no settings found for entry [db] in section [spooler] of configuration file: " + spooler.ini_path());
               
                if (this.getJobProperties().getProperty("db_class") == null || this.getJobProperties().getProperty("db_class").length() == 0)
                    throw new Exception("no settings found for entry [db_class] in section [spooler] of configuration file: " + spooler.ini_path());
               
               
                if (this.getLogger() != null) sosLogger.debug6("connecting to database.. .");

                String dbProperty = this.getJobProperties().getProperty("db").replaceAll("jdbc:", "-url=jdbc:");
                dbProperty = dbProperty.substring(dbProperty.indexOf('-'));
               
                SOSArguments arguments = new SOSArguments(dbProperty);

              this.setConnection( SOSConnection.createInstance
                                    this.getJobProperties().getProperty("db_class"),
                                    arguments.as_string("-class=", ""),
                                    arguments.as_string("-url=", ""),
                                    arguments.as_string("-user=", ""),
                                    arguments.as_string("-password=", ""),
                                    (SOSLogger)new SOSSchedulerLogger(this.spooler_log) )
                            );
              this.getConnection().connect();
               
              if (this.getLogger() != null) this.getLogger().debug6("..successfully connected to " + arguments.as_string("-url=", ""));
            }
View Full Code Here

    public boolean spooler_process() {

        String jobContent = "";
       
        try {
            this.setLogger(new SOSSchedulerLogger(this.spooler.log()));

            try { // to start sanity check job for the given schedulers in the given categories
                jobContent = "<start_job job=\"" + this.jobName + "\"><params>";
               
                Iterator categoryIterator = checkCategories.keySet().iterator();
View Full Code Here

                    result.get("class").toString(),
                    result.get("driver").toString(),
                    result.get("url").toString(),
                    result.get("username").toString(),
                    result.get("password").toString(),
          (SOSLogger)new SOSSchedulerLogger(job.spooler_log) );
           
      }
      catch (Exception e) {
          throw new Exception("error occurred establishing database connection: " + e.getMessage());
      }
View Full Code Here

            remoteKill(sshKillPid);
          }
        }else{

          SOSConfiguration con =
            new SOSConfiguration(null, schedulerParameter, null, null, "sos/net/sosftp/Configuration.xml", new SOSSchedulerLogger(spooler_log));

          con.checkConfigurationItems();

          ftpCommand = new sos.net.sosftp.SOSFTPCommandSSH(con, new SOSSchedulerLogger(spooler_log));
          ftpCommand.setSchedulerJob(this);
          boolean rc = ftpCommand.transfer();
         
          //test
          /*if(sosString.parseToBoolean(con.getParameterAsProperties().get("ignore_error"))) {
View Full Code Here

    public boolean spooler_init() {
       
        try {
            boolean rc = super.spooler_init();
            if (!rc) return false;
            this.setLogger(new SOSSchedulerLogger(spooler_log));           

            try { // to initialize database connection
               
                this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
                this.setJobProperties(this.jobSettings.getSection("spooler"));
View Full Code Here

     * @see sos.spooler.Monitor_impl#spooler_process_before()
     */
    public boolean spooler_process_before() {
       
        try { // to map order configuration to this job
            this.setLogger(new SOSSchedulerLogger(spooler_log));           
            Order order = spooler_task.order();
            String liveFolder="";
            String orderXML = order.xml();
        SOSXMLXPath xp = new SOSXMLXPath(new StringBuffer(orderXML));                     
        String jobChainPath = xp.selectSingleNodeValue("/order/@job_chain");
View Full Code Here

     */

    public boolean spooler_process_after(boolean rc) {
       
        try { // to map order configuration to this job
            this.setLogger(new SOSSchedulerLogger(spooler_log));           

            Order order = spooler_task.order();

            if (rc == false) {
                if (order.params() != null && order.params().value("setback") != null
View Full Code Here

    try {
      boolean rc = super.spooler_init();
      if (!rc)
        return false;
      this.setLogger(new SOSSchedulerLogger(spooler_log));

      try { // to initialize database connection
        this.setJobSettings(new SOSProfileSettings(spooler.ini_path()));
        this.setJobProperties(this.jobSettings.getSection("spooler"));
        if (this.getJobProperties().isEmpty())
View Full Code Here

TOP

Related Classes of sos.util.SOSSchedulerLogger

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.