[Batchserver-cvs] batchserver/src/org/jmonks/batchserver/framework/config BasicJobControllerConfig
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-09-14 23:04:28
|
Update of /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10191/config Modified Files: BasicJobControllerConfig.java ConfigurationException.java FrameworkConfig.java Log Message: no message Index: BasicJobControllerConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/BasicJobControllerConfig.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BasicJobControllerConfig.java 14 Sep 2006 05:04:33 -0000 1.8 --- BasicJobControllerConfig.java 14 Sep 2006 23:04:23 -0000 1.9 *************** *** 17,22 **** /** * BasicJobControllerConfig provides the configuration for the BasicJobController. ! * * @author Suresh Pragada * @version 1.0 --- 17,30 ---- /** + * <p> * BasicJobControllerConfig provides the configuration for the BasicJobController. ! * </p> ! * ! * <p> ! * BasicJobController holds the class name that extended the BasicJobProcessor and ! * number of instances(each instance run its own thread) to be created to run this ! * processor and configuration required by that processor. ! * </p> ! * * @author Suresh Pragada * @version 1.0 Index: FrameworkConfig.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/FrameworkConfig.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FrameworkConfig.java 14 Sep 2006 05:04:33 -0000 1.12 --- FrameworkConfig.java 14 Sep 2006 23:04:23 -0000 1.13 *************** *** 31,37 **** * <p> * FrameworkConfig class is responsible to read the framework configuration from ! * framework-config.xml file and gives configuration in the form of ! * configuration objects when needed. Framework configuration will be defined ! * in the file framework-config.xml and will be accessed using class path loader. * </p> * --- 31,38 ---- * <p> * FrameworkConfig class is responsible to read the framework configuration from ! * <code>framework-config.xml</code> file and gives the configuration ! * in the form of configuration objects when needed. ! * This searches the classpath for the <code>framework-config.xml</code>. Place ! * this file in any directory and keep the directory in the classpath. * </p> * *************** *** 49,58 **** /** ! * Declaration of XML file holds the framework configuration. */ private static final String FRAMEWORK_CONFIG_FILE = "framework-config.xml"; /** ! * Name of the tag represents the complete framework configuration. */ private static final String FRAMEWORK_CONFIG_TAG_NAME = "framework-confg"; --- 50,59 ---- /** ! * Declaration of XML file holds the framework configuration which is <code>framework-config.xml</code>. */ private static final String FRAMEWORK_CONFIG_FILE = "framework-config.xml"; /** ! * Name of the tag represents the complete framework configuration which is <code>framework-config</code>. */ private static final String FRAMEWORK_CONFIG_TAG_NAME = "framework-confg"; *************** *** 79,90 **** /** ! * ! * Private constructor to make sure FrameworkCongi cannot be instantiated. This will * read the framework configuration file and create the instances of of JobConfigFactoryConfig, * FrameworkLoggingConfig, JobConnectorConfig and RepositoryConfig by passing the correct DOM elements to their ! * constructors. This does the validation of configuration file against the defined XML schema file. ! * In case of errors it throws the ConfigurationException with the correct error code. ! * ! * @throws RuntimeException If framework configuration file is not properly formed and validation is failed. * @throws ConfigurationException If configuration file could not be found. */ --- 80,91 ---- /** ! * <p> ! * Private constructor to make sure FrameworkConfig cannot be instantiated. This will * read the framework configuration file and create the instances of of JobConfigFactoryConfig, * FrameworkLoggingConfig, JobConnectorConfig and RepositoryConfig by passing the correct DOM elements to their ! * constructors. In case of errors in the configuration it throws the ConfigurationException ! * with the correct error code. ! * </p> ! * * @throws ConfigurationException If configuration file could not be found. */ *************** *** 105,112 **** DocumentBuilderFactory documentBuilderFactory=DocumentBuilderFactory.newInstance(); documentBuilderFactory.setValidating(true); documentBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema"); InputStream xsdStream=FrameworkConfig.class.getClassLoader().getResourceAsStream("framework-config.xsd"); documentBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",xsdStream); ! DocumentBuilder documentBuilder=documentBuilderFactory.newDocumentBuilder(); documentBuilder.setErrorHandler(new DefaultHandler()); --- 106,115 ---- DocumentBuilderFactory documentBuilderFactory=DocumentBuilderFactory.newInstance(); documentBuilderFactory.setValidating(true); + + /* Commenting out the validator for a while documentBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema"); InputStream xsdStream=FrameworkConfig.class.getClassLoader().getResourceAsStream("framework-config.xsd"); documentBuilderFactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",xsdStream); ! */ DocumentBuilder documentBuilder=documentBuilderFactory.newDocumentBuilder(); documentBuilder.setErrorHandler(new DefaultHandler()); *************** *** 201,205 **** * Returns the FrameworkConfig instance. * ! * @return Returns the frameworkconfig instance. */ public static FrameworkConfig getInstance() --- 204,208 ---- * Returns the FrameworkConfig instance. * ! * @return Returns the FrameworkConfig instance. */ public static FrameworkConfig getInstance() *************** *** 231,234 **** --- 234,238 ---- /** * Returns the mgmt&mntr configuration defines in the framework configuration as JobConnectorConfig object. + * * @return Returns the JobConnectorConfig object. */ *************** *** 261,265 **** * <p> * JobConfigFactoryConfig class holds the configuration information required ! * by Job configuration factory. Factory would need some properties like source * of the job configuration, credentials to access the source * based on the factory type. This object provides the factory class name --- 265,269 ---- * <p> * JobConfigFactoryConfig class holds the configuration information required ! * by Job configuration factories. Factory would need some properties like source * of the job configuration, credentials to access the source * based on the factory type. This object provides the factory class name *************** *** 287,295 **** { /** ! * Tag name represents the job config factory config in framework configuration file. */ private static final String TAG_NAME = "job-config-factory-config"; /** ! * Attribute name represents the job config factory class name. */ private static final String FACTORY_CLASS_ATTRIBUTE_NAME = "job-config-factory-class-name"; --- 291,301 ---- { /** ! * Tag name represents the job config factory config in framework configuration file ! * which is <code>job-config-factory-config</code>. */ private static final String TAG_NAME = "job-config-factory-config"; /** ! * Attribute name represents the job config factory class name which is ! * <code>job-config-factory-class-name</code>. */ private static final String FACTORY_CLASS_ATTRIBUTE_NAME = "job-config-factory-class-name"; *************** *** 326,329 **** --- 332,336 ---- /** * Returns the class name of the factory used to read the job configuration. + * * @return Returns the factory class name. */ *************** *** 366,370 **** * FrameworkLoggingConfig class holds configuration required to enable the framework logging * by LoggingManager. This configuration would be like the directory needs to write ! * job log files and logging level of the framework logs and job logs and base package name * to be used to create the logging handlers. * This class can be accessed by all the classes in the framework --- 373,377 ---- * FrameworkLoggingConfig class holds configuration required to enable the framework logging * by LoggingManager. This configuration would be like the directory needs to write ! * job log files and logging level of the framework logs & job logs and base package name * to be used to create the logging handlers. * This class can be accessed by all the classes in the framework *************** *** 383,404 **** { /** ! * Tag name represents the logging config in framework configuration file. */ ! private static final String TAG_NAME = "framework-logging-config"; ! /** ! * Attribute name defines the framework logging level. */ private static final String FRAMEWORK_LOGGING_LEVEL_ATTRIB_NAME = "framework-logging-level"; /** ! * Attribute name defines the job logging directory. */ private static final String JOB_LOGGING_DIRECTORY_ATTRIB_NAME = "job-logging-directory"; /** ! * Attribute name defines the job logging level. */ private static final String JOB_LOGGING_LEVEL_ATTRIB_NAME = "job-logging-level"; /** ! * Attribute name defines the job base package name. */ private static final String JOB_BASE_PACKAGE_ATTRIB_NAME = "job-base-package-name"; --- 390,411 ---- { /** ! * Tag name represents the logging config in framework configuration file which ! * is <code>framework-logging-config</code>. */ ! private static final String TAG_NAME = "framework-logging-config"; /** ! * Attribute name defines the framework logging level which is <code>framework-logging-level</code>. */ private static final String FRAMEWORK_LOGGING_LEVEL_ATTRIB_NAME = "framework-logging-level"; /** ! * Attribute name defines the job logging directory which is <code>job-logging-directory</code>. */ private static final String JOB_LOGGING_DIRECTORY_ATTRIB_NAME = "job-logging-directory"; /** ! * Attribute name defines the job logging level which is <code>job-logging-level</code>. */ private static final String JOB_LOGGING_LEVEL_ATTRIB_NAME = "job-logging-level"; /** ! * Attribute name defines the job base package name which is <code>job-base-package-name</code>. */ private static final String JOB_BASE_PACKAGE_ATTRIB_NAME = "job-base-package-name"; *************** *** 531,540 **** { /** ! * Tag name represents the job connector config in framework configuration file. */ private static final String TAG_NAME = "job-connector-config"; /** ! * Attribute name defines the job connector server helper class name. */ private static final String JOB_CONNECTOR_HELPER_CLASS_ATTRIB_NAME = "job-connector-helper-class-name"; --- 538,549 ---- { /** ! * Tag name represents the job connector config in framework configuration file ! * which is <code>job-connector-config</code>. */ private static final String TAG_NAME = "job-connector-config"; /** ! * Attribute name defines the job connector server helper class name ! * which is <code>job-connector-helper-class-name</code>. */ private static final String JOB_CONNECTOR_HELPER_CLASS_ATTRIB_NAME = "job-connector-helper-class-name"; *************** *** 627,636 **** { /** ! * Tag name represents the repository config in framework configuration file. */ private static final String TAG_NAME = "repository-config"; /** ! * Attribute name defines the repository class name. */ private static final String REPOSITORY_CLASS_ATTRIB_NAME = "repository-class-name"; --- 636,646 ---- { /** ! * Tag name represents the repository config in framework configuration file ! * which is <code>repository-config</code>. */ private static final String TAG_NAME = "repository-config"; /** ! * Attribute name defines the repository class name which is <code>repository-class-name</code>. */ private static final String REPOSITORY_CLASS_ATTRIB_NAME = "repository-class-name"; *************** *** 728,740 **** { /** ! * Tag name represents the controller config in framework configuration file. */ private static final String TAG_NAME = "job-controller-config"; /** ! * Tag name defines the each controller. */ private static final String JOB_CONTROLLER_TAG_NAME = "job-controller"; /** ! * Attribute name defines the controller class name. */ private static final String JOB_CONTROLLER_CLASS_ATTRIB_NAME = "controller-class-name"; --- 738,751 ---- { /** ! * Tag name represents the controller config in framework configuration file ! * which is <code>job-controller-config</code>. */ private static final String TAG_NAME = "job-controller-config"; /** ! * Tag name defines the each controller which is <code>job-controller</code>. */ private static final String JOB_CONTROLLER_TAG_NAME = "job-controller"; /** ! * Attribute name defines the controller class name which is <code>controller-class-name</code>. */ private static final String JOB_CONTROLLER_CLASS_ATTRIB_NAME = "controller-class-name"; Index: ConfigurationException.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/src/org/jmonks/batchserver/framework/config/ConfigurationException.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ConfigurationException.java 29 Aug 2006 02:01:32 -0000 1.12 --- ConfigurationException.java 14 Sep 2006 23:04:23 -0000 1.13 *************** *** 4,10 **** /** * <p> ! * ConfigurationException defines problems in either framework configuration ! * or job configuration. This is runtime exception, since, configuration ! * problems cannot be detected until the runtime. This will have component * name identifies either framework configuration or job configuration and the message * explains the complete problem. --- 4,10 ---- /** * <p> ! * ConfigurationException defines the problems in either framework configuration ! * or job configuration. Since the configuration exceptions are cannot be detected ! * untile the runtime, this has been defined as Runtime exception. This will have the component * name identifies either framework configuration or job configuration and the message * explains the complete problem. |