processName = (String)sfResolve(varSFProcessName);
processName = sfResolve(varSFProcessName, processName, false); System.out.println("Process Name   =======" + processName);
   private void readSFAttributes() {      try {         try {            //outputStreamObj = (OutputStreamIntf)sfResolveHere(this.varOutputStream); //india team changes						outputStreamObj= (NotifyOutputFilterPrimImpl) sfResolve(varOutputStream, outputStreamObj , false);		if(outputStreamObj!=null)				System.out.println("outputStreamObj =============> "+ outputStreamObj.toString());			else				System.out.println("outputStreamObj is null=============> ");				         } catch (SmartFrogResolutionException e) {            log(varOutputStream + " not found.",  5);         } catch (Exception ex){			             ex.printStackTrace();         }         try {            //errorStreamObj = (StreamIntf)sfResolve(this.varErrorStream);			  errorStreamObj = (StreamIntf) sfResolve(this.varErrorStream, errorStreamObj , false);         } catch (SmartFrogResolutionException e) {            log(varErrorStream + " not found.", 5);         } catch (Exception ex){            ex.printStackTrace();         }         //To redirect output to printer            try {                Object obj = sfResolve(varOutputMsgTo);                //System.out.println("reference to" +varOutputMsgTo+ "found");                if (obj instanceof PrintMsgInt) {                    printMsgImp = (PrintMsgInt) obj;                } else {                    log("Wrong object in " + varOutputMsgTo, 1);                }            } catch (SmartFrogResolutionException e) {                log(varOutputMsgTo + " not found.", 5);            }            //To redirect error to printer            try {                Object obj = sfResolve(varErrorMsgTo);                //System.out.println("reference to" +varErrorMsgTo+ "found");                if (obj instanceof PrintErrMsgInt) {                    printErrMsgImp = (PrintErrMsgInt) obj;                } else {                    log("Wrong object in " + varErrorMsgTo, 1);                }            } catch (SmartFrogResolutionException e) {                log(varErrorMsgTo + " not found.", 5);            }         try {            this.logger = ((Integer)sfResolve(varLogger)).intValue();         } catch (SmartFrogResolutionException e) {            log(varLogger + " not found.", 5);         }         //Mandatory         processName = (String)sfResolve(varSFProcessName);         //     // Not mandatory         try {            //processId = (String)sfResolve(varSFProcessId);			 processId = sfResolve(varSFProcessId,processId, false);			         } catch (SmartFrogResolutionException e) {            log(varSFProcessId + " not found.", 5);         }         try {            startCmd = sfResolve(varSFCmdStart,startCmd,false);         } catch (SmartFrogResolutionException e) {            log(varSFCmdStart + " not found.", 5);         }         try {            stopCmd = sfResolve(varSFCmdStop,stopCmd,false);         } catch (SmartFrogResolutionException e) {            log(varSFCmdStop + " not found.", 5);         }//         try {//            startAtt = (String)sfResolve(varSFAttStart);//         } catch (SmartFrogResolutionException e) {//            log(varSFAttStart + " not found.",5);//         }//         try {//            stopAtt = (String)sfResolve(varSFAttStop);//         } catch (SmartFrogResolutionException e) {//            log( varSFAttStop + " not found.",5);//         }         readCmdAttributes();         // Just in case someone decides to overwrite startAtt and stopAtt created with readCmdAttributes!         // Optional attributes.       try {          startAtt = sfResolve(varStopAttVector, startAtt, false);          stopAtt = sfResolve(varStopAttVector, stopAtt, false);       } catch (SmartFrogResolutionException e) {          log ("readSFAttributes: Failed to read optional attribute: " + e.toString(),5);          throw e;       }         try {            workDir = (String)sfResolve(varSFWorkDir);         } catch (SmartFrogResolutionException e) {            log(varSFWorkDir + " not found.", 5);         }         try {            Object reStartProcessObj = sfResolve(varAutoReStart);            if (reStartProcessObj instanceof Boolean) {               this.setRestart(((Boolean)reStartProcessObj).booleanValue());            } else if (reStartProcessObj instanceof String) {               // String format (Deprecapeted)               String reStartProcessStr = (String) reStartProcessObj;               if (reStartProcessStr.equals("true")) {                  this.setRestart(true);                  log("Automatic Restarting ENABLED!", 5);               } else {                  //log( "Automatic Restarting process NOT aproved in deployment!",5);               }            }         } catch (SmartFrogResolutionException e) {            log(varAutoReStart + " not found.", 5);         }         try {            Object startProcessObj = sfResolve(varAutoStart);            if (startProcessObj instanceof Boolean) {               this.setStart(((Boolean)startProcessObj).booleanValue());            } else if (startProcessObj instanceof String) {               // String format (Deprecapeted)               String startProcessStr = (String) startProcessObj;               if (startProcessStr.equals("true")) {                  this.setStart(true);                  log("Automatic Starting ENABLED!", 5);               } else {                  //log( "Automatic Restarting process NOT aproved in deployment!",5);               }            }         } catch (SmartFrogResolutionException e) {            log(varAutoStart + " not found.", 5);         }         try {            Object shouldTerminateObj = sfResolve(varShouldTerminate);            if (shouldTerminateObj instanceof Boolean) {               this.setShouldTerminate(((Boolean)shouldTerminateObj).booleanValue());            } else if (shouldTerminateObj instanceof String) {               // String format (Deprecapeted)               String shouldTerminateStr = (String) shouldTerminateObj;               if (shouldTerminateStr.equals("true")) {                  this.setShouldTerminate(true);                  log("Component will TERMINATE with termination of spanned process!", 5);               } else {               }            }         } catch (SmartFrogResolutionException e) {            log(varShouldTerminate + " not found.", 5);         }         try {            Object shouldDetachObj = sfResolve(varShouldDetach);            if (shouldDetachObj instanceof Boolean) {               this.setShouldDetach(((Boolean)shouldDetachObj).booleanValue());            } else if (shouldDetachObj instanceof String) {               // String format (Deprecapeted)               String shouldDetachStr = (String) shouldDetachObj;               if (shouldDetachStr.equals("true")) {                  this.setShouldDetach(true);                  log("Component will DETACH with termination of spanned process!", 5);               } else {               }            }         } catch (SmartFrogResolutionException e) {            log(varShouldDetach + " not found.", 5);         }         try {            this.setDelayRestart(((Integer)sfResolve(varDelayReStart)).longValue());         } catch (SmartFrogResolutionException ex) {            log(varDelayReStart + " not found.", 5);         }         try {            Object isBatchObj = sfResolve(varIsBatch);            if (isBatchObj instanceof Boolean) {               this.isBatch=(((Boolean)isBatchObj).booleanValue());            } else if (isBatchObj instanceof String) {               // String format (Deprecapeted)               String isBatchStr = (String) isBatchObj;               if (isBatchStr.equals("true")) {                  this.isBatch = true;               }            }         } catch (SmartFrogResolutionException e) {            log(varIsBatch + " not found.", 5);         }         try {            Object runDeployObj = sfResolve(varRunDuringDeploy);            if (runDeployObj instanceof Boolean) {               this.runDuringDeploy=(((Boolean)runDeployObj).booleanValue());            } else if (runDeployObj instanceof String) {               // String format (Deprecapeted)               String runDeployStr = (String) runDeployObj;               if (runDeployStr.equals("true")) {                  this.runDuringDeploy = true;               }            }         } catch (SmartFrogResolutionException e) {            log(varRunDuringDeploy + " not found.", 5);         }         // Reading environment variables         try {            Vector envPropVector = (Vector)sfResolve(varEnvProp);            int index = 0;            if (!envPropVector.isEmpty()) {               envPropVector.trimToSize();               envProp = new String[envPropVector.size()];               envPropVector.copyInto(envProp);//               Iterator iter = envPropVector.iterator();//               int i = 0;//               while (iter.hasNext()) {//                  envProp[i++] = (String)iter.next();//               }               //end envProp            }            //log(5, "Vector found:" + varEnvProp +", "+this.notifierId());         } catch (SmartFrogResolutionException e) {            log(varEnvProp + " not found.", 5);         }      } catch (Exception e) {         System.err.println("Error reading SF attributes: " + e.getMessage());         e.printStackTrace();      }   }