Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29261
Modified Files:
Main.java
Log Message:
no message
Index: Main.java
===================================================================
RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/Main.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Main.java 5 Sep 2006 21:49:42 -0000 1.15
--- Main.java 6 Sep 2006 13:32:58 -0000 1.16
***************
*** 114,117 ****
--- 114,119 ----
logger.debug("Initializing the job logging");
LoggingManager.initializeJobLogging(jobName,frameworkConfig.getFrameworkLoggingConfig(), jobConfig.getJobLoggingConfig());
+ logger.debug("Overriding the controller configuration properties with the command line properties.");
+ jobConfig.getJobControllerConfig().overrideConfigProperties(configMap);
logger.debug("Creating the job controller");
JobController jobController=JobController.getJobController(jobName, jobConfig.getJobControllerConfig());
***************
*** 187,191 ****
--- 189,202 ----
public static void main(String args[])
{
+ /**
+ * Get the framework configuration and initialize the framework logging.
+ */
+ logger.debug("Retrieving the framework configuration");
+ FrameworkConfig frameworkConfig=FrameworkConfig.getInstance();
+ logger.debug("Initializing the framework logging");
+ LoggingManager.initializeFrameworkLogging(frameworkConfig.getFrameworkLoggingConfig());
+
logger.info("Job processing has been started");
+ ErrorCode exitCode=ErrorCode.JOB_COMPLETED_SUCCESSFULLY;
Map configMap=new HashMap();
/**
***************
*** 196,203 ****
StringBuffer commandLineConfiguration=new StringBuffer();
for(int i=0;i<args.length;i++)
- {
commandLineConfiguration.append(args[i]+":");
- }
FrameworkUtil.loadPropertiesFromStringToMap(commandLineConfiguration.toString(),configMap);
}
catch(IllegalArgumentException exception)
--- 207,213 ----
StringBuffer commandLineConfiguration=new StringBuffer();
for(int i=0;i<args.length;i++)
commandLineConfiguration.append(args[i]+":");
FrameworkUtil.loadPropertiesFromStringToMap(commandLineConfiguration.toString(),configMap);
+ exitCode=Main.process(configMap);
}
catch(IllegalArgumentException exception)
***************
*** 206,215 ****
logger.fatal("Exception while parsing the command line parameters = " + args
+ " Message = " + exception.getMessage(),exception);
! System.exit(ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR.getCode());
}
! ErrorCode errorCode=Main.process(configMap);
! logger.error("Job finished = " + errorCode.toString());
! System.exit(errorCode.getCode());
! }
!
}
--- 216,223 ----
logger.fatal("Exception while parsing the command line parameters = " + args
+ " Message = " + exception.getMessage(),exception);
! exitCode=ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR;
}
! logger.error("Job finishing with the exit code = " + exitCode.toString());
! System.exit(exitCode.getCode());
! }
}
|