Thread: [Batchserver-cvs] batchserver/src/org/jmonks/batchserver/framework/config/xml batch-config.xml,1.2,1
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-03-13 14:32:41
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19442/config/xml Modified Files: batch-config.xml XMLBasicJobControllerConfig.java XMLJobConfig.java XMLJobConfigFactory.java XMLJobControllerConfig.java XMLPoolJobControllerConfig.java Log Message: no message Index: XMLJobConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/XMLJobConfig.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLJobConfig.java 10 Mar 2006 08:15:36 -0000 1.5 --- XMLJobConfig.java 13 Mar 2006 14:32:37 -0000 1.6 *************** *** 10,15 **** package org.jmonks.batchserver.framework.config.xml; ! ! import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.JobConfig; --- 10,14 ---- package org.jmonks.batchserver.framework.config.xml; ! import java.util.logging.Logger; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.JobConfig; *************** *** 54,57 **** --- 53,59 ---- */ public static final String JOB_STATUS_ATTRIBUTE_NAME = "job-status"; + + private static Logger logger=Logger.getLogger(XMLJobConfig.class.getName()); + /** * Loads the job name and controller configuration into the job configuration object. *************** *** 64,67 **** --- 66,70 ---- XMLJobConfig(Element jobConfigElement) { + logger.entering(XMLJobConfig.class.getName(),"Constructor"); this.jobName=jobConfigElement.getAttribute(XMLJobConfig.JOB_NAME_ATTRIBUTE_NAME); *************** *** 80,87 **** { Element controllerConfigElement=(Element)controllerConfigNodeList.item(0); this.jobControllerConfig=XMLJobControllerConfig.getJobControllerConfig(controllerConfigElement); } else ! throw new ConfigurationException(ErrorCode.NONE_OR_MULTIPLE_JOB_CONTROLLER_CONFIGS); } --- 83,95 ---- { Element controllerConfigElement=(Element)controllerConfigNodeList.item(0); + logger.fine("Requesting controller config factory to get the controller configuration object"); this.jobControllerConfig=XMLJobControllerConfig.getJobControllerConfig(controllerConfigElement); + logger.config("Returned controller configuration : " + this.jobControllerConfig); } else ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG, "Found " + controllerConfigNodeList.getLength() ! + XMLJobControllerConfig.JOB_CONTROLLER_ELEMENT_NAME + " element(s) in configuration of job " + jobName + "."); ! ! logger.exiting(XMLJobConfig.class.getName(),"Constructor"); } Index: batch-config.xml =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/batch-config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** batch-config.xml 10 Mar 2006 08:15:36 -0000 1.2 --- batch-config.xml 13 Mar 2006 14:32:37 -0000 1.3 *************** *** 17,21 **** <job-config job-name="process_file_xyz" job-status="active"> <job-controller job-controller-class-name="org.jmonks.batchserver.framework.controller.basic.BasicJobController"> ! <basic-job-processor basic-job-processor-class-name="com.mycompany.batch.processfilexyz.XyzProcessor"> <property key="basic-job-processor-key1">processor-value1</property> </basic-job-processor> --- 17,21 ---- <job-config job-name="process_file_xyz" job-status="active"> <job-controller job-controller-class-name="org.jmonks.batchserver.framework.controller.basic.BasicJobController"> ! <basic-job-processor basic-job-processor-class-name="com.mycompany.batch.processfilexyz.XyzProcessor" thread-count="2"> <property key="basic-job-processor-key1">processor-value1</property> </basic-job-processor> Index: XMLPoolJobControllerConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/XMLPoolJobControllerConfig.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLPoolJobControllerConfig.java 10 Mar 2006 08:15:36 -0000 1.5 --- XMLPoolJobControllerConfig.java 13 Mar 2006 14:32:37 -0000 1.6 *************** *** 10,15 **** package org.jmonks.batchserver.framework.config.xml; ! ! import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.common.FrameworkUtil; import org.jmonks.batchserver.framework.config.ConfigurationException; --- 10,14 ---- package org.jmonks.batchserver.framework.config.xml; ! import java.util.logging.Logger; import org.jmonks.batchserver.framework.common.FrameworkUtil; import org.jmonks.batchserver.framework.config.ConfigurationException; *************** *** 73,76 **** --- 72,77 ---- private static final String THREAD_COUNT_ATTRIBUTE_NAME = "thread-count"; + private static Logger logger=Logger.getLogger(XMLPoolJobControllerConfig.class.getName()); + /** * Loads the XMLPoolJobControllerConfig from XML DOM Element <job-controller> *************** *** 82,88 **** public XMLPoolJobControllerConfig(Element controllerConfigElement) { this.jobControllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(this.jobControllerClassName==null) ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CLASS_NOT_DEFINED); FrameworkUtil.loadPropertiesFromElementToMap(controllerConfigElement, this.jobControllerConfigProps); --- 83,91 ---- public XMLPoolJobControllerConfig(Element controllerConfigElement) { + logger.entering(XMLPoolJobControllerConfig.class.getName(),"Constructor"); this.jobControllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(this.jobControllerClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); FrameworkUtil.loadPropertiesFromElementToMap(controllerConfigElement, this.jobControllerConfigProps); *************** *** 97,101 **** this.poolJobLoaderClassName=xmlPoolJobLoaderElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_LOADER_CLASS_ATTRIBUTE_NAME); if(this.poolJobLoaderClassName==null) ! throw new ConfigurationException(ErrorCode.POOL_JOB_LOADER_CLASS_NAME_NOT_DEFINED); else { --- 100,105 ---- this.poolJobLoaderClassName=xmlPoolJobLoaderElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_LOADER_CLASS_ATTRIBUTE_NAME); if(this.poolJobLoaderClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLPoolJobControllerConfig.POOL_JOB_LOADER_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); else { *************** *** 104,108 **** } else ! throw new ConfigurationException(ErrorCode.NONE_OR_MULTIPLE_POOL_JOB_LOADER_ELEMENTS_FOUND); /** --- 108,113 ---- } else ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! "Found " + xmlPoolJobLoaderNodeList.getLength() + " element(s) in the pool job controller configuration."); /** *************** *** 115,119 **** this.poolJobProcessorClassName=xmlPoolJobProcessorElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME); if(this.poolJobProcessorClassName==null) ! throw new ConfigurationException(ErrorCode.POOL_JOB_PROCESSOR_CLASS_NAME_NOT_DEFINED); else { --- 120,125 ---- this.poolJobProcessorClassName=xmlPoolJobProcessorElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME); if(this.poolJobProcessorClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLPoolJobControllerConfig.POOL_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); else { *************** *** 123,127 **** } else ! throw new ConfigurationException(ErrorCode.NONE_OR_MULTIPLE_POOL_JOB_PROCESSOR_ELEMENTS_FOUND); /** --- 129,134 ---- } else ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! "Found " + xmlPoolJobProcessorNodeList.getLength() + " element(s) in the pool job controller configuration."); /** *************** *** 134,138 **** this.poolClassName=xmlJobPoolElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_POOL_CLASS_ATTRIBUTE_NAME); if(this.poolClassName==null) ! throw new ConfigurationException(ErrorCode.POOL_JOB_POOL_CLASS_NAME_NOT_DEFINED); else { --- 141,146 ---- this.poolClassName=xmlJobPoolElement.getAttribute(XMLPoolJobControllerConfig.POOL_JOB_POOL_CLASS_ATTRIBUTE_NAME); if(this.poolClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLPoolJobControllerConfig.POOL_JOB_POOL_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); else { *************** *** 141,145 **** } else ! throw new ConfigurationException(ErrorCode.NONE_OR_MULTIPLE_JOB_POOL_ELEMENTS_FOUND); } --- 149,156 ---- } else ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! "Found " + xmlJobPoolNodeList.getLength() + " element(s) in the pool job controller configuration."); ! ! logger.exiting(XMLPoolJobControllerConfig.class.getName(),"Constructor"); } Index: XMLJobControllerConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/XMLJobControllerConfig.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XMLJobControllerConfig.java 8 Mar 2006 23:21:14 -0000 1.4 --- XMLJobControllerConfig.java 13 Mar 2006 14:32:37 -0000 1.5 *************** *** 13,17 **** import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; ! import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.FrameworkConfig; --- 13,17 ---- import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; ! import java.util.logging.Logger; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.FrameworkConfig; *************** *** 41,44 **** --- 41,47 ---- */ public static final String JOB_CONTROLLER_CONFIG_FACTORY_CLASS_ATTRIBUTE_NAME = "xml-factory-config-class-name"; + + private static Logger logger=Logger.getLogger(XMLJobControllerConfig.class.getName()); + /** * <p> *************** *** 62,70 **** public static JobControllerConfig getJobControllerConfig(Element controllerConfigElement) { JobControllerConfig controllerConfig=null; String controllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(controllerClassName==null) ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CLASS_NOT_DEFINED); else { --- 65,75 ---- public static JobControllerConfig getJobControllerConfig(Element controllerConfigElement) { + logger.entering(XMLJobControllerConfig.class.getName(),"getJobControllerConfig"); JobControllerConfig controllerConfig=null; String controllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(controllerClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME ! + " attribute value cannot be null."); else { *************** *** 73,77 **** String controllerConfigClassName=FrameworkConfig.getInstance().getJobControllerConfig().getConfigClassName(controllerClassName, XMLJobControllerConfig.JOB_CONTROLLER_CONFIG_FACTORY_CLASS_ATTRIBUTE_NAME); if(controllerConfigClassName==null) ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CLASS_NOT_DEFINED); else { --- 78,85 ---- String controllerConfigClassName=FrameworkConfig.getInstance().getJobControllerConfig().getConfigClassName(controllerClassName, XMLJobControllerConfig.JOB_CONTROLLER_CONFIG_FACTORY_CLASS_ATTRIBUTE_NAME); if(controllerConfigClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! "Could not found the controller config class for the controller type " + ! controllerClassName + " for the factory " + XMLJobControllerConfig.JOB_CONTROLLER_CONFIG_FACTORY_CLASS_ATTRIBUTE_NAME + "."); ! else { *************** *** 79,82 **** --- 87,91 ---- Constructor constructor=configClass.getConstructor(new Class[]{Element.class}); controllerConfig=(JobControllerConfig)constructor.newInstance(new Object[]{controllerConfigElement}); + logger.fine("Got the controller configuration : " + controllerConfig); } } *************** *** 84,111 **** { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CONFIG_CLASS_NOT_VALID); } catch(NoSuchMethodException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CONFIG_CLASS_NOT_VALID); } catch(ClassNotFoundException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CONFIG_CLASS_NOT_VALID); } catch(IllegalAccessException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CONFIG_CLASS_NOT_VALID); } catch(InvocationTargetException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CONFIG_CLASS_NOT_VALID); } } ! return controllerConfig; } --- 93,120 ---- { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, exception.getMessage()); } catch(NoSuchMethodException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, exception.getMessage()); } catch(ClassNotFoundException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, exception.getMessage()); } catch(IllegalAccessException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, exception.getMessage()); } catch(InvocationTargetException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, exception.getMessage()); } } ! logger.exiting(XMLJobControllerConfig.class.getName(),"getJobControllerConfig"); return controllerConfig; } Index: XMLJobConfigFactory.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/XMLJobConfigFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLJobConfigFactory.java 10 Mar 2006 08:15:36 -0000 1.5 --- XMLJobConfigFactory.java 13 Mar 2006 14:32:37 -0000 1.6 *************** *** 18,25 **** import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; - import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.JobConfig; --- 18,25 ---- import java.util.HashMap; import java.util.Map; + import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.jmonks.batchserver.framework.config.ConfigurationException; import org.jmonks.batchserver.framework.config.JobConfig; *************** *** 74,77 **** --- 74,79 ---- private Element batchConfigElement=null; + private static Logger logger=Logger.getLogger(XMLJobConfigFactory.class.getName()); + /** * This constructor initializes the factory by accepting the required properties *************** *** 85,95 **** public XMLJobConfigFactory(Map configFactoryProps) { this.configFactoryProps=new HashMap(configFactoryProps); String absoluteLocation=(String)this.configFactoryProps.get(XMLJobConfigFactory.PROPERTY_JOB_CONFIG_FILE_ABSOLUTE_LOCATION); String classpathLocation=(String)this.configFactoryProps.get(XMLJobConfigFactory.PROPERTY_JOB_CONFIG_FILE_CLASSPATH_LOCATION); ! if(absoluteLocation==null && classpathLocation==null) ! throw new ConfigurationException(ErrorCode.XML_JOB_CONFIG_FACTORY_PROPERTIES_MISSING); else if(absoluteLocation!=null) { --- 87,100 ---- public XMLJobConfigFactory(Map configFactoryProps) { + logger.entering(XMLJobConfigFactory.class.getName(),"Constructor"); this.configFactoryProps=new HashMap(configFactoryProps); String absoluteLocation=(String)this.configFactoryProps.get(XMLJobConfigFactory.PROPERTY_JOB_CONFIG_FILE_ABSOLUTE_LOCATION); String classpathLocation=(String)this.configFactoryProps.get(XMLJobConfigFactory.PROPERTY_JOB_CONFIG_FILE_CLASSPATH_LOCATION); ! ! logger.fine("Absolute location : " + absoluteLocation + " classpath location : " + classpathLocation); if(absoluteLocation==null && classpathLocation==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, "XML Job configuration location is not specified " + ! "using either absolute or classpath attribute."); else if(absoluteLocation!=null) { *************** *** 104,117 **** { InputStream inputStream=new FileInputStream(jobConfigFile); if(!this.createBatchConfigElement(inputStream)) ! throw new ConfigurationException(ErrorCode.NO_BATCH_CONFIG_ELEMENT_IN_XML_JOB_CONFIGURATION); } else ! throw new ConfigurationException(ErrorCode.XML_JOB_CONFIG_FACTORY_INVALID_ABS_LOCATION); } catch(FileNotFoundException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ErrorCode.XML_JOB_CONFIG_FACTORY_INVALID_ABS_LOCATION); } } --- 109,128 ---- { InputStream inputStream=new FileInputStream(jobConfigFile); + logger.fine("Would be able to read the configuration stream from absolute path " + absoluteLocation); if(!this.createBatchConfigElement(inputStream)) ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, ! "Error while parsing and locating root element batch-config in the XML " + ! "job configuration file " + absoluteLocation + "."); } else ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, ! "XML job configuration file " + absoluteLocation + " is not exist or it could not be a file."); ! } catch(FileNotFoundException exception) { exception.printStackTrace(); ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, ! "XML job configuration file " + absoluteLocation + " cannot be found"); } } *************** *** 124,134 **** InputStream inputStream=XMLJobConfigFactory.class.getResourceAsStream(classpathLocation); if(inputStream==null) ! throw new ConfigurationException(ErrorCode.XML_JOB_CONFIG_FACTORY_INVALID_CLASSPATH_LOCATION); else { if(!this.createBatchConfigElement(inputStream)) ! throw new ConfigurationException(ErrorCode.NO_BATCH_CONFIG_ELEMENT_IN_XML_JOB_CONFIGURATION); } } } --- 135,152 ---- InputStream inputStream=XMLJobConfigFactory.class.getResourceAsStream(classpathLocation); if(inputStream==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, ! "XML job configuration file " + classpathLocation + " cannot be located on the classpath."); ! else { + logger.fine("Would be able to read the configuration from class path : " + classpathLocation); if(!this.createBatchConfigElement(inputStream)) ! throw new ConfigurationException(ConfigurationException.JOB_CONFIG_FACTORY_CONFIG, ! "Error while parsing and locating the batch-config element in the " + ! "XML Job configuration file " + classpathLocation + "."); ! } } + logger.exiting(XMLJobConfigFactory.class.getName(),"Constructor"); } *************** *** 147,150 **** --- 165,169 ---- public JobConfig getJobConfig(String jobName) { + logger.entering(XMLJobConfigFactory.class.getName(),"getJobConfig"); JobConfig jobConfig=null; /** *************** *** 169,172 **** --- 188,192 ---- } } + logger.exiting(XMLJobConfigFactory.class.getName(),"getJobConfig", jobConfig); return jobConfig; } Index: XMLBasicJobControllerConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/xml/XMLBasicJobControllerConfig.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLBasicJobControllerConfig.java 10 Mar 2006 08:15:36 -0000 1.5 --- XMLBasicJobControllerConfig.java 13 Mar 2006 14:32:37 -0000 1.6 *************** *** 10,15 **** package org.jmonks.batchserver.framework.config.xml; ! ! import org.jmonks.batchserver.framework.common.ErrorCode; import org.jmonks.batchserver.framework.common.FrameworkUtil; import org.jmonks.batchserver.framework.config.BasicJobControllerConfig; --- 10,14 ---- package org.jmonks.batchserver.framework.config.xml; ! import java.util.logging.Logger; import org.jmonks.batchserver.framework.common.FrameworkUtil; import org.jmonks.batchserver.framework.config.BasicJobControllerConfig; *************** *** 51,54 **** --- 50,56 ---- */ private static final String THREAD_COUNT_ATTRIBUTE_NAME = "thread-count"; + + private static Logger logger=Logger.getLogger(XMLBasicJobControllerConfig.class.getName()); + /** * Loads the XML job controller configuration into XMLBasicJobControllerConfig object. *************** *** 60,66 **** public XMLBasicJobControllerConfig(Element controllerConfigElement) { this.jobControllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(this.jobControllerClassName==null) ! throw new ConfigurationException(ErrorCode.JOB_CONTROLLER_CLASS_NOT_DEFINED); FrameworkUtil.loadPropertiesFromElementToMap(controllerConfigElement, this.jobControllerConfigProps); --- 62,70 ---- public XMLBasicJobControllerConfig(Element controllerConfigElement) { + logger.entering(XMLBasicJobControllerConfig.class.getName(),"Constructor"); this.jobControllerClassName=controllerConfigElement.getAttribute(XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME); if(this.jobControllerClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLJobControllerConfig.JOB_CONTROLLER_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); FrameworkUtil.loadPropertiesFromElementToMap(controllerConfigElement, this.jobControllerConfigProps); *************** *** 72,76 **** this.basicJobProcessorClassName=xmlBasicJobProcessorElement.getAttribute(XMLBasicJobControllerConfig.BASIC_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME); if(this.basicJobProcessorClassName==null) ! throw new ConfigurationException(ErrorCode.BASIC_JOB_PROCESSOR_CLASS_NAME_NOT_DEFINED); else { --- 76,81 ---- this.basicJobProcessorClassName=xmlBasicJobProcessorElement.getAttribute(XMLBasicJobControllerConfig.BASIC_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME); if(this.basicJobProcessorClassName==null) ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! XMLBasicJobControllerConfig.BASIC_JOB_PROCESSOR_CLASS_ATTRIBUTE_NAME + " attribute value cannot be null."); else { *************** *** 80,84 **** } else ! throw new ConfigurationException(ErrorCode.NONE_OR_MULTIPLE_BASIC_JOB_PROCESSOR_ELEMENTS_FOUND); } } --- 85,92 ---- } else ! throw new ConfigurationException(ConfigurationException.JOB_CONTROLLER_CONFIG, ! "Found " + xmlBasicJobProcessorNodeList.getLength() + " element(s) in the basic job controller configuration."); ! ! logger.exiting(XMLBasicJobControllerConfig.class.getName(),"Constructor"); } } |