Skip to main content
Last updated December 06, 2011 18:17, by Prabir
Feedicon  
[[Home|Back to home]] <pre> <?xml version="1.0" encoding="UTF-8"?> <batchJobs xmlns="http://javawikiforbeginners.blogspot.com/BatchJob" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://javawikiforbeginners.blogspot.com/BatchJob batchjob1.0.xsd"> <shared-datasource> <datasource-name></datasource-name> <connection-url></connection-url> <driver-class></driver-class> <user-name></user-name> <password></password> </shared-datasource> <batchjob id="1" name="MyJob1" destroy-method="sjd" init-method="init" enable="true" use-shared-datasource="false"> <job-class>test.MyJob1</job-class> <run-frequency> <min>*</min> <hour>*</hour> <day>*</day> <mon>*</mon> <week>*</week> </run-frequency> <run-priority>5</run-priority> <datasource> <datasource-name>MYORG2/DS</datasource-name> <connection-url>jdbc:mysql://localhost:3306/test2</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>root</user-name> <password></password> <auto-commit>true</auto-commit> </datasource> <logger-info> <name>MyJob1Logger</name> <logfilePath>logs/myjob1_log.log</logfilePath> <loggerType>rolling</loggerType> <append>Yes</append> <pattern></pattern> <maxFileSize>100KB</maxFileSize> <maxBackupIndex>2</maxBackupIndex> </logger-info> </batchjob> <batchjob id="2" name="MyJob2" destroy-method="sjd" init-method="init" enable="true" use-shared-datasource="false"> <job-class>test.MyJob2</job-class> <run-frequency> <min>*/2</min> <hour>*</hour> <day>*</day> <mon>*</mon> <week>*</week> </run-frequency> <run-priority>5</run-priority> <datasource> <datasource-name>MYORG/DS</datasource-name> <connection-url>jdbc:mysql://localhost:3306/test</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>root</user-name> <password></password> <auto-commit>true</auto-commit> </datasource> <logger-info> <name>MyJob2Logger</name> <logfilePath>logs/MyJob2_log.log</logfilePath> <loggerType>rolling</loggerType> <append>Yes</append> <pattern></pattern> <maxFileSize>100KB</maxFileSize> <maxBackupIndex>2</maxBackupIndex> </logger-info> </batchjob> </batchJobs> </pre>
 
 
Close
loading
Please Confirm
Close