batchserver-cvs Mailing List for Enterprise Batch Server (Page 12)
Brought to you by:
suresh_pragada
You can subscribe to this list here.
2006 |
Jan
|
Feb
(10) |
Mar
(159) |
Apr
(5) |
May
(52) |
Jun
(70) |
Jul
|
Aug
(28) |
Sep
(256) |
Oct
(38) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Suresh <sur...@us...> - 2006-09-06 22:09:27
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/io In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14404 Modified Files: FileSpecTest.java Added Files: IOTestSuite.java Log Message: no message --- NEW FILE: IOTestSuite.java --- /* * IOTestSuite.java * JUnit based test * * Created on March 3, 2006, 8:29 PM */ package org.jmonks.batchserver.io; import junit.framework.*; import org.jmonks.batchserver.io.flat.DelimitedFlatFileReaderTest; import org.jmonks.batchserver.io.flat.DelimitedFlatFileWriterTest; import org.jmonks.batchserver.io.flat.FixedWidthFlatFileReaderTest; import org.jmonks.batchserver.io.flat.FixedWidthFlatFileWriterTest; import org.jmonks.batchserver.io.xml.XMLFileReaderTest; import org.jmonks.batchserver.io.xml.XMLFileWriterTest; /** * This is the main suite for the framework. This actually decides which suites * needs to be considered as the framework suite. * * @author Suresh Pragada */ public class IOTestSuite extends TestCase { public IOTestSuite(String testName) { super(testName); } protected void setUp() throws Exception { } protected void tearDown() throws Exception { } /** * suite method returns all the suites to be considered as a IO suite. */ public static Test suite() { TestSuite ioSuite = new TestSuite(); ioSuite.addTest(FileSpecTest.suite()); ioSuite.addTest(XMLFileWriterTest.suite()); ioSuite.addTest(XMLFileReaderTest.suite()); ioSuite.addTest(DelimitedFlatFileWriterTest.suite()); ioSuite.addTest(DelimitedFlatFileReaderTest.suite()); ioSuite.addTest(FixedWidthFlatFileWriterTest.suite()); ioSuite.addTest(FixedWidthFlatFileReaderTest.suite()); return ioSuite; } } Index: FileSpecTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/io/FileSpecTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileSpecTest.java 22 Aug 2006 23:43:12 -0000 1.2 --- FileSpecTest.java 6 Sep 2006 22:09:25 -0000 1.3 *************** *** 35,39 **** { TestSuite suite = new TestSuite(FileSpecTest.class); - return suite; } --- 35,38 ---- |
From: Suresh <sur...@us...> - 2006-09-06 22:09:03
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14002 Modified Files: TestBasicJobProcessor.java Log Message: no message Index: TestBasicJobProcessor.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic/TestBasicJobProcessor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestBasicJobProcessor.java 5 Sep 2006 18:16:20 -0000 1.4 --- TestBasicJobProcessor.java 6 Sep 2006 22:09:01 -0000 1.5 *************** *** 23,38 **** private static Logger logger=Logger.getLogger(TestBasicJobProcessor.class); ! /** Creates a new instance of TestBasicJobProcessor */ ! public TestBasicJobProcessor() ! { ! logger.error("TestBasicJobProcessor has been initialized"); ! } ! ! public void cleanup() { ! logger.error("TestBasicJobProcessor cleanup has been called"); } ! public int getProcessedCount() { return 10; --- 23,36 ---- private static Logger logger=Logger.getLogger(TestBasicJobProcessor.class); ! public TestBasicJobProcessor() { ! logger.error("Error :: TestBasicJobProcessor has been initialized"); ! logger.info("Info :: TestBasicJobProcessor has been initialized"); ! logger.debug("Debug :: TestBasicJobProcessor has been initialized"); ! logger.fatal("Fatal :: TestBasicJobProcessor has been initialized"); ! logger.warn("Warn :: TestBasicJobProcessor has been initialized"); } ! public int getProcessedRecordsCount() { return 10; *************** *** 41,95 **** public Object getProcessorState() { ! return "Running"; ! } ! ! public int getTotalCount() ! { ! return 20; ! } ! ! public void initialize(java.util.Map configProps) ! { ! logger.error("TestBasicJobProcessor initalize has been called"); ! logger.error("Called with the map = " + configProps); ! } ! ! public ErrorCode process() ! { ! return ErrorCode.JOB_CONFIGURATION_ERROR; ! } ! ! public boolean resume() ! { ! logger.error("TestBasicJobProcessor resume has been called"); ! return false; ! } ! ! public boolean stop() ! { ! logger.error("TestBasicJobProcessor stop has been called"); ! return false; ! } ! ! public boolean suspend() ! { ! logger.error("TestBasicJobProcessor suspend has been called"); ! return false; ! } ! ! public int getProcessedRecordsCount() ! { ! return 0; } public int getTotalRecordsCount() { ! return 0; } public ErrorCode process(java.util.Map configProps) { ! return null; } - } --- 39,53 ---- public Object getProcessorState() { ! return "RUNNING"; } public int getTotalRecordsCount() { ! return 50; } public ErrorCode process(java.util.Map configProps) { ! return ErrorCode.createErrorCode(10001, "This is my error message."); } } |
From: Suresh <sur...@us...> - 2006-09-06 22:08:47
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13980 Modified Files: FrameworkTestSuite.java MainTest.java Log Message: no message Index: FrameworkTestSuite.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/FrameworkTestSuite.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FrameworkTestSuite.java 5 Sep 2006 18:16:05 -0000 1.7 --- FrameworkTestSuite.java 6 Sep 2006 22:08:43 -0000 1.8 *************** *** 60,63 **** --- 60,64 ---- mainSuite.addTest(PoolJobControllerConfigTest.suite()); mainSuite.addTest(RepositoryTest.suite()); + mainSuite.addTest(MainTest.suite()); return mainSuite; Index: MainTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/MainTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MainTest.java 5 Sep 2006 21:49:08 -0000 1.1 --- MainTest.java 6 Sep 2006 22:08:43 -0000 1.2 *************** *** 27,35 **** public static Test suite() { ! TestSuite suite = new TestSuite(MainTest.class); return suite; } /** * Test of process method by passing the empty configMap. */ --- 27,51 ---- public static Test suite() { ! TestSuite suite = new TestSuite(); ! suite.addTest(new MainTest("testProcess")); ! //suite.addTest(new MainTest("testProcessNoArgs")); ! //suite.addTest(new MainTest("testProcessNullArgs")); ! //suite.addTest(new MainTest("testProcessWrongJobName")); return suite; } /** + * Test of process method by passing the right configuration. + */ + public void testProcess() + { + Map args=new HashMap(); + args.put(Main.JOB_NAME_KEY_NAME, "process_file_xyz"); + ErrorCode returnCode=Main.process(args); + assertNotNull(returnCode); + assertEquals(ErrorCode.JOB_COMPLETED_SUCCESSFULLY.getCode(), returnCode.getCode()); + } + + /** * Test of process method by passing the empty configMap. */ |
From: Suresh <sur...@us...> - 2006-09-06 22:08:26
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13959 Modified Files: LoggingManager.java Log Message: no message Index: LoggingManager.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/LoggingManager.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LoggingManager.java 28 Mar 2006 04:45:35 -0000 1.6 --- LoggingManager.java 6 Sep 2006 22:08:23 -0000 1.7 *************** *** 45,48 **** --- 45,52 ---- */ public static final String DEFAULT_MESSAGE_PATTERN = "%5p [%d{ISO8601}] [%t - %C] %m%n"; + /** + * Tells whether framework logging has been intialized or not. + */ + private static boolean isFrameworkLoggingInitialized=false; /** *************** *** 128,157 **** * @throws ConfigurationException If logging directory cannot be created. */ ! public static void initializeFrameworkLogging(FrameworkConfig.FrameworkLoggingConfig frameworkLoggingConfig) { ! File loggingDirecotry=new File(frameworkLoggingConfig.getJobLoggingDirecotry()); ! LoggingManager.createDirectory(loggingDirecotry); ! String completeFileName=loggingDirecotry.getAbsolutePath()+File.separator+LoggingManager.FRAMEWORK_LOGGING_FILE; ! ! PatternLayout layout=new PatternLayout(LoggingManager.DEFAULT_MESSAGE_PATTERN); ! RollingFileAppender fileAppender=null; ! try ! { ! fileAppender=new RollingFileAppender(layout,completeFileName,true); ! } ! catch(IOException exception) { ! exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.LOGGING_CONFIG, exception.getMessage()); } ! fileAppender.setMaxFileSize("10MB"); ! fileAppender.activateOptions(); ! Logger rootLogger=LogManager.getRootLogger(); ! rootLogger.removeAllAppenders(); ! ! Logger frameworkLogger=Logger.getLogger("org.jmonks.batchserver.framework"); ! frameworkLogger.addAppender(fileAppender); ! frameworkLogger.setAdditivity(true); ! frameworkLogger.setLevel(Level.toLevel(frameworkLoggingConfig.getFrameworkLoggingLevel())); } --- 132,168 ---- * @throws ConfigurationException If logging directory cannot be created. */ ! public static synchronized void initializeFrameworkLogging(FrameworkConfig.FrameworkLoggingConfig frameworkLoggingConfig) { ! if(!isFrameworkLoggingInitialized) { ! File loggingDirecotry=new File(frameworkLoggingConfig.getJobLoggingDirecotry()); ! LoggingManager.createDirectory(loggingDirecotry); ! String completeFileName=loggingDirecotry.getAbsolutePath()+File.separator+LoggingManager.FRAMEWORK_LOGGING_FILE; ! ! PatternLayout layout=new PatternLayout(LoggingManager.DEFAULT_MESSAGE_PATTERN); ! RollingFileAppender fileAppender=null; ! try ! { ! fileAppender=new RollingFileAppender(layout,completeFileName,true); ! } ! catch(IOException exception) ! { ! exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.LOGGING_CONFIG, exception.getMessage()); ! } ! fileAppender.setMaxFileSize("10MB"); ! fileAppender.activateOptions(); ! Logger rootLogger=LogManager.getRootLogger(); ! rootLogger.removeAllAppenders(); ! ! Logger frameworkLogger=Logger.getLogger("org.jmonks.batchserver.framework"); ! frameworkLogger.addAppender(fileAppender); ! frameworkLogger.setAdditivity(true); ! frameworkLogger.setLevel(Level.toLevel(frameworkLoggingConfig.getFrameworkLoggingLevel())); ! ! isFrameworkLoggingInitialized=true; } ! else ! System.out.println("Framework logging has been already initialized."); } |
From: Suresh <sur...@us...> - 2006-09-06 22:08:07
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/repository/db4o In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13894 Modified Files: Db4oRepository.java Log Message: no message Index: Db4oRepository.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/repository/db4o/Db4oRepository.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Db4oRepository.java 28 Mar 2006 04:57:57 -0000 1.5 --- Db4oRepository.java 6 Sep 2006 22:08:05 -0000 1.6 *************** *** 266,271 **** logger.debug("job name = " + jobName + " registratinfo = " + registrationInfo); ! if(jobName==null || registrationInfo==null) ! throw new IllegalArgumentException("job name and mgmt&mntr registration information cannot be null to register the job."); boolean registered=true; --- 266,273 ---- logger.debug("job name = " + jobName + " registratinfo = " + registrationInfo); ! if(jobName==null) ! throw new IllegalArgumentException("Job name cannot be null to register the job in repository."); ! if(registrationInfo==null) ! throw new IllegalArgumentException("Job registration information cannot be null to register the job in repository."); boolean registered=true; |
From: Suresh <sur...@us...> - 2006-09-06 22:07:56
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/management/jmxmp In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13562 Modified Files: RepositoryJMXMPConnectorHelper.java Log Message: no message Index: RepositoryJMXMPConnectorHelper.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/management/jmxmp/RepositoryJMXMPConnectorHelper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RepositoryJMXMPConnectorHelper.java 28 Mar 2006 04:56:02 -0000 1.1 --- RepositoryJMXMPConnectorHelper.java 6 Sep 2006 22:07:53 -0000 1.2 *************** *** 32,36 **** logger.trace("Entering init") ; /** ! * Because this uses the repository defined for this framework as the * lookup location, this implementation does not require any properties * in configuration file to initialize the lookup location. --- 32,36 ---- logger.trace("Entering init") ; /** ! * Because this uses the repository, defined for this framework as the * lookup location, this implementation does not require any properties * in configuration file to initialize the lookup location. *************** *** 62,66 **** JMXServiceURL jmxServiceURL=jmxConnectorServer.getAddress(); boolean registered=JobContext.getReposiotry().registerJobMgmtMntrInfo(jobName, jmxServiceURL.toString()); ! logger.debug(jobName + " with the service url " + jmxServiceURL.toString() + " registered in repository = " + registered); logger.trace("Exiting registerConnectorServer") ; --- 62,66 ---- JMXServiceURL jmxServiceURL=jmxConnectorServer.getAddress(); boolean registered=JobContext.getReposiotry().registerJobMgmtMntrInfo(jobName, jmxServiceURL.toString()); ! logger.info(jobName + " with the service url " + jmxServiceURL.toString() + " registered in repository = " + registered); logger.trace("Exiting registerConnectorServer") ; |
From: Suresh <sur...@us...> - 2006-09-06 22:07:47
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/management In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13541 Modified Files: JobConnectorHelper.java JobManagementAgent.java Log Message: no message Index: JobManagementAgent.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/management/JobManagementAgent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JobManagementAgent.java 29 Aug 2006 02:01:33 -0000 1.3 --- JobManagementAgent.java 6 Sep 2006 22:07:43 -0000 1.4 *************** *** 14,18 **** import org.jmonks.batchserver.framework.controller.JobController; - /** * <p> --- 14,17 ---- *************** *** 144,148 **** logger.debug("Got the jmx connector server from the implementation"); } ! JobMonitorMBean monitorBean=new JobMonitor(jobController); JobManagerMBean managerBean=new JobManager(jobController); --- 143,150 ---- logger.debug("Got the jmx connector server from the implementation"); } ! ! /** ! * Create the mbeans and register them with this mbean server. ! */ JobMonitorMBean monitorBean=new JobMonitor(jobController); JobManagerMBean managerBean=new JobManager(jobController); *************** *** 158,168 **** mbeanServer.registerMBean(monitorBean, monitorBeanObjectName); mbeanServer.registerMBean(managerBean, managerBeanObjectName); - /** ! * Create the mbeans and register them with this mbean server. */ boolean registered=this.jobConnectorHelper.registerConnectorServer(jobName,this.jmxConnectorServer); if(registered) { this.started=true; } --- 160,171 ---- mbeanServer.registerMBean(monitorBean, monitorBeanObjectName); mbeanServer.registerMBean(managerBean, managerBeanObjectName); /** ! * Start the connector server and register it with the job name. */ + this.jmxConnectorServer.start(); boolean registered=this.jobConnectorHelper.registerConnectorServer(jobName,this.jmxConnectorServer); if(registered) { + logger.debug("Successfully registered the connector server with the job name"); this.started=true; } *************** *** 193,197 **** logger.error(exception.getMessage(),exception); } ! logger.trace("Exiting start"); --- 196,204 ---- logger.error(exception.getMessage(),exception); } ! catch(IOException exception) ! { ! exception.printStackTrace(); ! logger.error(exception.getMessage(),exception); ! } logger.trace("Exiting start"); *************** *** 240,242 **** --- 247,260 ---- return this.stopped; } + + /** + * Tells whether the agent is running or not. This state needs to be queried + * before trying to stop the agent. + * + * @return Returns true if agent is running, false otherwise. + */ + public boolean isRunning() + { + return this.started; + } } Index: JobConnectorHelper.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/management/JobConnectorHelper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JobConnectorHelper.java 28 Mar 2006 04:55:17 -0000 1.1 --- JobConnectorHelper.java 6 Sep 2006 22:07:43 -0000 1.2 *************** *** 76,80 **** { logger.trace("Entering getJobConnectorHelper"); ! if(jobConnectorHelper!=null) { FrameworkConfig.JobConnectorConfig jobConnectorConfig=FrameworkConfig.getInstance().getJobConnectorConfig(); --- 76,80 ---- { logger.trace("Entering getJobConnectorHelper"); ! if(jobConnectorHelper==null) { FrameworkConfig.JobConnectorConfig jobConnectorConfig=FrameworkConfig.getInstance().getJobConnectorConfig(); |
From: Suresh <sur...@us...> - 2006-09-06 22:07:24
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13517 Modified Files: ErrorCode.java 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.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Main.java 6 Sep 2006 13:32:58 -0000 1.16 --- Main.java 6 Sep 2006 22:07:22 -0000 1.17 *************** *** 96,100 **** logger.error("Received configuration map = " + configMap); jobName=(String)configMap.get(Main.JOB_NAME_KEY_NAME); ! logger.debug("Job to be invoked = " + jobName); if(jobName!=null && !"".equals(jobName.trim())) { --- 96,100 ---- logger.error("Received configuration map = " + configMap); jobName=(String)configMap.get(Main.JOB_NAME_KEY_NAME); ! logger.info("Job to be invoked = " + jobName); if(jobName!=null && !"".equals(jobName.trim())) { *************** *** 128,132 **** */ JobStatistics jobStatistics=jobController.getJobStatistics(); ! logger.info(jobStatistics); Repository.getRepository().logStatistics(jobStatistics); } --- 128,132 ---- */ JobStatistics jobStatistics=jobController.getJobStatistics(); ! logger.error(jobStatistics); Repository.getRepository().logStatistics(jobStatistics); } *************** *** 140,144 **** else { ! logger.fatal("job-name parameter cannot be found in the configuration to kick of the job = " + jobName); returnCode=ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR; } --- 140,145 ---- else { ! logger.fatal("job-name parameter cannot be found in the configuration to kick " + ! "off the job . Received configuration = " + configMap); returnCode=ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR; } *************** *** 160,165 **** { logger.debug("Unregistering the controller with the management agent"); ! if(jobManagementAgent!=null) ! jobManagementAgent.stop(returnCode); } logger.error("Exiting process = " + returnCode); --- 161,166 ---- { logger.debug("Unregistering the controller with the management agent"); ! if(jobManagementAgent!=null && jobManagementAgent.isRunning()) ! jobManagementAgent.stop(returnCode); } logger.error("Exiting process = " + returnCode); *************** *** 185,220 **** * * @param args Configuration details in command line params as name=value format - * */ 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(); - /** - * Translate the command line parameters into the configuration map. - */ try { ! 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) { exception.printStackTrace(); ! 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()); --- 186,237 ---- * * @param args Configuration details in command line params as name=value format */ public static void main(String args[]) { ErrorCode exitCode=ErrorCode.JOB_COMPLETED_SUCCESSFULLY; try { ! /** ! * 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()); ! ! /** ! * Translate the command line parameters into the configuration map. ! */ ! logger.info("Job processing has been started"); ! Map configMap=new HashMap(); for(int i=0;i<args.length;i++) ! { ! int index=args[i].indexOf("="); ! if(index>1) ! { ! configMap.put(args[i].substring(0, index), args[i].substring(index+1)); ! logger.info("Loaded the argument = " + args[i] + " into configuration map."); ! } ! else ! logger.info("Not loading the argument = " + args[i] + " into configuration map. " + ! "It is not following the name=value format."); ! } ! /** ! * Kick off the process by passing configuration map. ! */ exitCode=Main.process(configMap); } ! catch(ConfigurationException exception) { exception.printStackTrace(); ! logger.fatal("Configuration Exception in the component " + exception.getExceptionComponent() + ! " while processing the job. Message = " + exception.getMessage(),exception); ! exitCode=exception.getErrorCode(); ! } ! catch(Throwable exception) ! { ! exception.printStackTrace(); ! logger.fatal("Exception while processing the job. Message = "+ exception.getMessage(),exception); ! exitCode=ErrorCode.JOB_COMPLETED_WITH_ERRORS.appendMessage(exception.getMessage()); } logger.error("Job finishing with the exit code = " + exitCode.toString()); Index: ErrorCode.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/ErrorCode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ErrorCode.java 29 Aug 2006 02:01:33 -0000 1.1 --- ErrorCode.java 6 Sep 2006 22:07:22 -0000 1.2 *************** *** 142,146 **** * Represents the configuration error used to invoke the job. */ ! public static final ErrorCode JOB_INVOKATION_CONFIGURAION_ERROR = new ErrorCode(1000,"Error while parsing the configuraion passed to invoke job."); /** * Represents the framework configuration error. --- 142,146 ---- * Represents the configuration error used to invoke the job. */ ! public static final ErrorCode JOB_INVOKATION_CONFIGURAION_ERROR = new ErrorCode(1000,"Error in configuraion passed to invoke job."); /** * Represents the framework configuration error. |
From: Suresh <sur...@us...> - 2006-09-06 13:33:00
|
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()); ! } } |
From: Suresh <sur...@us...> - 2006-09-05 21:49:44
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5287 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.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Main.java 29 Aug 2006 02:01:33 -0000 1.14 --- Main.java 5 Sep 2006 21:49:42 -0000 1.15 *************** *** 4,8 **** import java.util.Map; import org.apache.log4j.Logger; - import org.jmonks.batchserver.framework.ErrorCode; import org.jmonks.batchserver.framework.util.FrameworkUtil; import org.jmonks.batchserver.framework.config.ConfigurationException; --- 4,7 ---- *************** *** 34,37 **** --- 33,41 ---- { private static Logger logger=Logger.getLogger(Main.class); + + /** + * Key name have the value of the job name in configuration map. + */ + public static final String JOB_NAME_KEY_NAME = "job-name"; /** *************** *** 67,91 **** * * @return Returns zero for success and non-zero for failure. */ public static ErrorCode process(Map configMap) { ! logger.error("Entering process = " + configMap); ErrorCode returnCode=ErrorCode.JOB_COMPLETED_SUCCESSFULLY; - String jobName=null; JobManagementAgent jobManagementAgent=null; try { ! jobName=(String)configMap.get("job-name"); logger.debug("Job to be invoked = " + jobName); if(jobName!=null && !"".equals(jobName.trim())) { /** - * 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()); - /** * Get the job configuration from the configuration factory. */ --- 71,103 ---- * * @return Returns zero for success and non-zero for failure. + * + * @throws IllegalArgumentException If input configMap is null. */ public static ErrorCode process(Map configMap) { ! if(configMap==null) ! throw new IllegalArgumentException("Argument configMap cannot be null."); ! ErrorCode returnCode=ErrorCode.JOB_COMPLETED_SUCCESSFULLY; JobManagementAgent jobManagementAgent=null; + String jobName=null; try { ! /** ! * 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()); ! /** ! * Get the job name from given configMap and start execution. ! */ ! logger.error("Received configuration map = " + configMap); ! jobName=(String)configMap.get(Main.JOB_NAME_KEY_NAME); logger.debug("Job to be invoked = " + jobName); if(jobName!=null && !"".equals(jobName.trim())) { /** * Get the job configuration from the configuration factory. */ *************** *** 94,117 **** logger.debug("Retrieving the job configuration"); JobConfig jobConfig=jobConfigFactory.getJobConfig(jobName); ! /** ! * Initialize the job logging and kick off the controller after ! * registering it to the management agent. ! */ ! logger.debug("Initializing the job logging"); ! LoggingManager.initializeJobLogging(jobName,frameworkConfig.getFrameworkLoggingConfig(), jobConfig.getJobLoggingConfig()); ! logger.debug("Creating the job controller"); ! JobController jobController=JobController.getJobController(jobName, jobConfig.getJobControllerConfig()); ! logger.debug("Retrieving the management agent"); ! jobManagementAgent=JobManagementAgent.getJobManagementAgent(); ! logger.debug("Registering the controller with the management agent"); ! jobManagementAgent.start(jobName, jobController); ! logger.error("Kicking off the controller"); ! returnCode=jobController.process(); ! /** ! * Save the statistics into repository ! */ ! JobStatistics jobStatistics=jobController.getJobStatistics(); ! logger.info(jobStatistics); ! Repository.getRepository().logStatistics(jobStatistics); } else --- 106,138 ---- logger.debug("Retrieving the job configuration"); JobConfig jobConfig=jobConfigFactory.getJobConfig(jobName); ! if(jobConfig!=null) ! { ! /** ! * Initialize the job logging and kick off the controller after ! * registering it to the management agent. ! */ ! logger.debug("Initializing the job logging"); ! LoggingManager.initializeJobLogging(jobName,frameworkConfig.getFrameworkLoggingConfig(), jobConfig.getJobLoggingConfig()); ! logger.debug("Creating the job controller"); ! JobController jobController=JobController.getJobController(jobName, jobConfig.getJobControllerConfig()); ! logger.debug("Retrieving the management agent"); ! jobManagementAgent=JobManagementAgent.getJobManagementAgent(); ! logger.debug("Registering the controller with the management agent"); ! jobManagementAgent.start(jobName, jobController); ! logger.error("Kicking off the controller"); ! returnCode=jobController.process(); ! /** ! * Save the statistics into repository ! */ ! JobStatistics jobStatistics=jobController.getJobStatistics(); ! logger.info(jobStatistics); ! Repository.getRepository().logStatistics(jobStatistics); ! } ! else ! { ! logger.fatal("Unable to find the job configuration for the given job = " + jobName ! + " in the configured job configuration factory = " + jobConfigFactory.toString()); ! returnCode=ErrorCode.JOB_IS_NOT_CONFIGURED; ! } } else *************** *** 131,135 **** { exception.printStackTrace(); ! logger.fatal("Exception while processing the job = " + exception.getMessage(),exception); returnCode=ErrorCode.JOB_COMPLETED_WITH_ERRORS.appendMessage(exception.getMessage()); } --- 152,156 ---- { exception.printStackTrace(); ! logger.fatal("Exception while processing the job = " + jobName + " Message = "+ exception.getMessage(),exception); returnCode=ErrorCode.JOB_COMPLETED_WITH_ERRORS.appendMessage(exception.getMessage()); } *************** *** 183,191 **** { exception.printStackTrace(); ! logger.fatal("Exception while parsing the command line parameters = " + exception.getMessage(),exception); System.exit(ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR.getCode()); } ErrorCode errorCode=Main.process(configMap); ! logger.info("Job finished = " + errorCode.toString()); System.exit(errorCode.getCode()); } --- 204,213 ---- { exception.printStackTrace(); ! 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()); } |
From: Suresh <sur...@us...> - 2006-09-05 21:49:11
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5213 Added Files: MainTest.java Log Message: no message --- NEW FILE: MainTest.java --- /* * MainTest.java * JUnit based test * * Created on September 5, 2006, 3:32 PM */ package org.jmonks.batchserver.framework; import java.util.HashMap; import java.util.Map; import junit.framework.*; /** * * @author w951h8m */ public class MainTest extends TestCase { public MainTest(String testName) { super(testName); } public static Test suite() { TestSuite suite = new TestSuite(MainTest.class); return suite; } /** * Test of process method by passing the empty configMap. */ public void testProcessNoArgs() { Map args=new HashMap(); ErrorCode returnCode=Main.process(args); assertNotNull(returnCode); int exitCode=returnCode.getCode(); assertEquals(ErrorCode.JOB_INVOKATION_CONFIGURAION_ERROR.getCode(), exitCode); } /** * Test of process method by passing the null configMap. */ public void testProcessNullArgs() { try { ErrorCode returnCode=Main.process(null); fail("Framework is accepting the null configMap"); } catch(IllegalArgumentException exception){} } /** * Test of process method by passing the wrong job name in config map. */ public void testProcessWrongJobName() { Map args=new HashMap(); args.put(Main.JOB_NAME_KEY_NAME, "NOT_AVAILABLE"); ErrorCode returnCode=Main.process(args); assertNotNull(returnCode); int exitCode=returnCode.getCode(); assertEquals(ErrorCode.JOB_IS_NOT_CONFIGURED.getCode(), exitCode); } } |
From: Suresh <sur...@us...> - 2006-09-05 18:16:55
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/util In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14133 Added Files: FrameworkUtilTest.java Log Message: no message --- NEW FILE: FrameworkUtilTest.java --- package org.jmonks.batchserver.framework.util; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; public class FrameworkUtilTest extends TestCase { public FrameworkUtilTest(String testName) { super(testName); } /** * Test case to check that FrameworkUtil cannot be instantiated. */ public void testInstantiation() { try { FrameworkUtil utility=(FrameworkUtil)FrameworkUtil.class.newInstance(); fail("FrameworkUtil should not be instantiated."); } catch(InstantiationException ex) { /** * This is expected as Frameworkutil cannot be instantiated. */ } catch(IllegalAccessException ex) { /** * This is expected as the constructor of FrameworkUtil is private. */ } } /** * Test to make sure method "loadPropertiesFromElementToMap" is not accepting null * parameters as input and loading the properties as inteded. */ public void testLoadPropertiesFromElementToMap() throws Exception { Element configElement=null; Map propertyMap=null; try { FrameworkUtil.loadPropertiesFromElementToMap(configElement,propertyMap); fail("Accepting the null valuse as input parameters."); } catch(IllegalArgumentException exception) { /** * This is as expected. */ } try { FrameworkUtil.loadPropertiesFromElementToMap(configElement,new HashMap()); fail("Accepting the null element as input parameter "); } catch(IllegalArgumentException exception) { /** * This is as expected. */ } DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder=builderFactory.newDocumentBuilder(); Document document=documentBuilder.newDocument(); configElement=document.createElement("some-config"); Element propertyElement1=document.createElement("property"); propertyElement1.setAttribute("key","config-key1"); Node textNode1=document.createTextNode("config-value1"); propertyElement1.appendChild(textNode1); Element propertyElement2=document.createElement("property"); propertyElement2.setAttribute("key","config-key2"); Node textNode2=document.createCDATASection("This is CDATA section"); propertyElement2.appendChild(textNode2); configElement.appendChild(propertyElement1); configElement.appendChild(propertyElement2); try { FrameworkUtil.loadPropertiesFromElementToMap(configElement,propertyMap); fail("Accepting the property map uninitialized."); } catch(IllegalArgumentException exception) { /** * This is as expected. */ } propertyMap=new HashMap(); FrameworkUtil.loadPropertiesFromElementToMap(configElement, propertyMap); assertEquals(2,propertyMap.size()); } protected void tearDown() throws Exception { super.tearDown(); } protected void setUp() throws Exception { super.setUp(); } public static Test suite() { TestSuite suite=new TestSuite(FrameworkUtilTest.class); return suite; } } |
From: Suresh <sur...@us...> - 2006-09-05 18:16:34
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/repository In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14111 Modified Files: RepositoryTest.java Log Message: no message Index: RepositoryTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/repository/RepositoryTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RepositoryTest.java 22 Mar 2006 14:23:12 -0000 1.4 --- RepositoryTest.java 5 Sep 2006 18:16:32 -0000 1.5 *************** *** 205,209 **** assertFalse(released); ! boolean saved=repository.saveController(jobName, new PoolJobController(null)); assertTrue(saved); controller=(JobController)repository.loadController(jobName); --- 205,209 ---- assertFalse(released); ! boolean saved=repository.saveController(jobName, new PoolJobController()); assertTrue(saved); controller=(JobController)repository.loadController(jobName); *************** *** 212,216 **** assertTrue(released); ! saved=repository.saveController(jobName, new PoolJobController(null)); assertTrue(saved); saved=repository.saveController(jobName, new BasicJobController()); --- 212,216 ---- assertTrue(released); ! saved=repository.saveController(jobName, new PoolJobController()); assertTrue(saved); saved=repository.saveController(jobName, new BasicJobController()); |
From: Suresh <sur...@us...> - 2006-09-05 18:16:23
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14095 Modified Files: TestBasicJobProcessor.java Log Message: no message Index: TestBasicJobProcessor.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic/TestBasicJobProcessor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestBasicJobProcessor.java 29 Aug 2006 02:29:23 -0000 1.3 --- TestBasicJobProcessor.java 5 Sep 2006 18:16:20 -0000 1.4 *************** *** 80,91 **** --- 80,94 ---- public int getProcessedRecordsCount() { + return 0; } public int getTotalRecordsCount() { + return 0; } public ErrorCode process(java.util.Map configProps) { + return null; } |
From: Suresh <sur...@us...> - 2006-09-05 18:16:08
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14042 Modified Files: FrameworkTestSuite.java Log Message: no message Index: FrameworkTestSuite.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/FrameworkTestSuite.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FrameworkTestSuite.java 5 Sep 2006 18:06:43 -0000 1.6 --- FrameworkTestSuite.java 5 Sep 2006 18:16:05 -0000 1.7 *************** *** 11,15 **** import org.jmonks.batchserver.framework.ErrorCodeTest; import org.jmonks.batchserver.framework.util.FrameworkUtilTest; - import org.jmonks.batchserver.framework.common.StatusCodeTest; import org.jmonks.batchserver.framework.config.BasicJobControllerConfigTest; import org.jmonks.batchserver.framework.config.ConfigurationExceptionTest; --- 11,14 ---- *************** *** 53,57 **** mainSuite.addTest(FrameworkUtilTest.suite()); mainSuite.addTest(ErrorCodeTest.suite()); - mainSuite.addTest(StatusCodeTest.suite()); mainSuite.addTest(FrameworkConfigTest.suite()); mainSuite.addTest(ConfigurationExceptionTest.suite()); --- 52,55 ---- |
From: Suresh <sur...@us...> - 2006-09-05 18:07:54
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/mgmtmntr In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10428 Removed Files: JobStatusTest.java Log Message: no message --- JobStatusTest.java DELETED --- |
From: Suresh <sur...@us...> - 2006-09-05 18:07:27
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10403 Removed Files: ErrorCodeTest.java FrameworkUtilTest.java StatusCodeTest.java Log Message: no message --- FrameworkUtilTest.java DELETED --- --- ErrorCodeTest.java DELETED --- --- StatusCodeTest.java DELETED --- |
From: Suresh <sur...@us...> - 2006-09-05 18:06:56
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/util In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10011/util Log Message: Directory /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/util added to the repository |
From: Suresh <sur...@us...> - 2006-09-05 18:06:46
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9999 Modified Files: FrameworkTestSuite.java Added Files: ErrorCodeTest.java Log Message: no message Index: FrameworkTestSuite.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/FrameworkTestSuite.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FrameworkTestSuite.java 17 Mar 2006 05:15:28 -0000 1.5 --- FrameworkTestSuite.java 5 Sep 2006 18:06:43 -0000 1.6 *************** *** 9,14 **** import junit.framework.*; ! import org.jmonks.batchserver.framework.common.ErrorCodeTest; ! import org.jmonks.batchserver.framework.common.FrameworkUtilTest; import org.jmonks.batchserver.framework.common.StatusCodeTest; import org.jmonks.batchserver.framework.config.BasicJobControllerConfigTest; --- 9,14 ---- import junit.framework.*; ! import org.jmonks.batchserver.framework.ErrorCodeTest; ! import org.jmonks.batchserver.framework.util.FrameworkUtilTest; import org.jmonks.batchserver.framework.common.StatusCodeTest; import org.jmonks.batchserver.framework.config.BasicJobControllerConfigTest; --- NEW FILE: ErrorCodeTest.java --- /* * ErrorCodeTest.java * JUnit based test * * Created on March 3, 2006, 8:12 PM */ package org.jmonks.batchserver.framework; import junit.framework.*; /** * Test cases to test the ErrorCode.java. * * @author Suresh Pragada */ public class ErrorCodeTest extends TestCase { public ErrorCodeTest(String testName) { super(testName); } protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public static Test suite() { TestSuite suite = new TestSuite(ErrorCodeTest.class); return suite; } /** * Test that getCode is returning the expected errorCode. */ public void testGetCode() { ErrorCode errorCode=ErrorCode.FRAMEWORK_CONFIGURATION_ERROR; int code=errorCode.getCode(); assertEquals(1001,code); } /** * Test that getMessage is not returning null. */ public void testGetMessage() { ErrorCode errorCode=ErrorCode.FRAMEWORK_CONFIGURATION_ERROR; String message=errorCode.getMessage(); assertNotNull(message); } /** * Test that ErrorCode cannot be instantiated. */ public void testInstantiation() { try { ErrorCode errorCode=(ErrorCode)ErrorCode.class.newInstance(); fail("ErrorCode should not be instantiated."); } catch(InstantiationException ex) { /** * This is expected as ErrorCode cannot be instantiated. */ } catch(IllegalAccessException ex) { /** * This is expected as the constructor of ErrorCode is private. */ } } } |
From: Suresh <sur...@us...> - 2006-09-03 16:53:54
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/io/xml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26299 Modified Files: XMLFileWriterTest.java Log Message: no message Index: XMLFileWriterTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/io/xml/XMLFileWriterTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XMLFileWriterTest.java 22 Aug 2006 23:43:01 -0000 1.4 --- XMLFileWriterTest.java 3 Sep 2006 16:53:51 -0000 1.5 *************** *** 56,60 **** // Create and write the header record. XMLWriterRecord headerRecord=(XMLWriterRecord)fileWriter.createWriterRecord(RecordType.HEADER); ! headerRecord.writeSimpleElement("file-type", "Employee Records"); fileWriter.writeRecord(headerRecord); --- 56,60 ---- // Create and write the header record. XMLWriterRecord headerRecord=(XMLWriterRecord)fileWriter.createWriterRecord(RecordType.HEADER); ! headerRecord.writeSimpleElement("file-type", "Employee Records & Details"); fileWriter.writeRecord(headerRecord); |
From: Suresh <sur...@us...> - 2006-09-03 16:53:37
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/io/xml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26275 Modified Files: XMLFileReader.java Log Message: no message Index: XMLFileReader.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/io/xml/XMLFileReader.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** XMLFileReader.java 1 Sep 2006 22:06:39 -0000 1.14 --- XMLFileReader.java 3 Sep 2006 16:53:33 -0000 1.15 *************** *** 330,334 **** isPreviousElementStart=false; /** ! * */ StringBuffer elementData=new StringBuffer(chars.getData()); --- 330,336 ---- isPreviousElementStart=false; /** ! * Loop through all the next available character events. If there are ! * any escape characters, stax is returning them as individual character ! * events. So, loop through all the events and save them as a value. */ StringBuffer elementData=new StringBuffer(chars.getData()); |
From: Suresh <sur...@us...> - 2006-09-01 22:06:41
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/io/xml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv439 Modified Files: XMLFileReader.java Log Message: no message Index: XMLFileReader.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/io/xml/XMLFileReader.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** XMLFileReader.java 18 Aug 2006 18:36:13 -0000 1.13 --- XMLFileReader.java 1 Sep 2006 22:06:39 -0000 1.14 *************** *** 329,333 **** { isPreviousElementStart=false; ! elementStack.push(chars.getData()); } } --- 329,341 ---- { isPreviousElementStart=false; ! /** ! * ! */ ! StringBuffer elementData=new StringBuffer(chars.getData()); ! while(reader.peek().isCharacters()) ! { ! elementData.append(((Characters)reader.nextEvent()).getData()); ! } ! elementStack.push(elementData.toString()); } } |
From: Suresh <sur...@us...> - 2006-08-29 02:29:28
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/mgmtmntr In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32164/framework/mgmtmntr Modified Files: JobStatusTest.java Log Message: no message Index: JobStatusTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/mgmtmntr/JobStatusTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JobStatusTest.java 25 Apr 2006 13:06:49 -0000 1.2 --- JobStatusTest.java 29 Aug 2006 02:29:23 -0000 1.3 *************** *** 9,13 **** import junit.framework.*; ! import org.jmonks.batchserver.framework.management.JobStatus; /** --- 9,13 ---- import junit.framework.*; ! /** |
From: Suresh <sur...@us...> - 2006-08-29 02:29:27
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32164/framework/controller/basic Modified Files: BasicJobControllerTest.java TestBasicJobProcessor.java Log Message: no message Index: BasicJobControllerTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic/BasicJobControllerTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicJobControllerTest.java 4 May 2006 22:27:14 -0000 1.1 --- BasicJobControllerTest.java 29 Aug 2006 02:29:23 -0000 1.2 *************** *** 10,14 **** import junit.framework.*; import org.jmonks.batchserver.framework.LoggingManager; ! import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.config.BasicJobControllerConfig; import org.jmonks.batchserver.framework.config.FrameworkConfig; --- 10,14 ---- import junit.framework.*; import org.jmonks.batchserver.framework.LoggingManager; ! import org.jmonks.batchserver.framework.ErrorCode; import org.jmonks.batchserver.framework.config.BasicJobControllerConfig; import org.jmonks.batchserver.framework.config.FrameworkConfig; Index: TestBasicJobProcessor.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/controller/basic/TestBasicJobProcessor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestBasicJobProcessor.java 5 May 2006 21:07:10 -0000 1.2 --- TestBasicJobProcessor.java 29 Aug 2006 02:29:23 -0000 1.3 *************** *** 12,16 **** import org.apache.log4j.Logger; ! import org.jmonks.batchserver.framework.common.ErrorCode; /** --- 12,16 ---- import org.apache.log4j.Logger; ! import org.jmonks.batchserver.framework.ErrorCode; /** *************** *** 77,80 **** --- 77,92 ---- return false; } + + public int getProcessedRecordsCount() + { + } + + public int getTotalRecordsCount() + { + } + + public ErrorCode process(java.util.Map configProps) + { + } } |
From: Suresh <sur...@us...> - 2006-08-29 02:29:25
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/common In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32164/framework/common Modified Files: ErrorCodeTest.java FrameworkUtilTest.java Log Message: no message Index: FrameworkUtilTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/common/FrameworkUtilTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FrameworkUtilTest.java 7 Mar 2006 03:41:35 -0000 1.4 --- FrameworkUtilTest.java 29 Aug 2006 02:29:23 -0000 1.5 *************** *** 12,15 **** --- 12,16 ---- import org.w3c.dom.Element; import org.w3c.dom.Node; + import org.jmonks.batchserver.framework.util.FrameworkUtil; public class FrameworkUtilTest extends TestCase Index: ErrorCodeTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batchserver/framework/common/ErrorCodeTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ErrorCodeTest.java 25 Apr 2006 13:06:49 -0000 1.5 --- ErrorCodeTest.java 29 Aug 2006 02:29:23 -0000 1.6 *************** *** 9,12 **** --- 9,13 ---- import junit.framework.*; + import org.jmonks.batchserver.framework.ErrorCode; /** |