
mework.batch.spring-batch-samples.1.1.3.RELEASE.source-code.adhoc-job-launcher-context.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-batch-samples
Show all versions of spring-batch-samples
Example batch jobs using Spring Batch Core and Execution.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <import resource="simple-job-launcher-context.xml" /> <bean class="org.springframework.jmx.export.MBeanExporter"> <property name="beans"> <map> <entry key="spring:service=batch,bean=jobOperator"> <bean class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target" ref="jobOperator" /> <property name="interceptorNames" value="exceptionTranslator" /> </bean> </entry> <entry key="spring:service=batch,bean=notificationPublisher" value-ref="notificationPublisher" /> <entry key="spring:service=batch,bean=jobLoader" value-ref="loader" /> </map> </property> <property name="assembler"> <bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler"> <property name="interfaceMappings"> <map> <entry key="spring:service=batch,bean=jobOperator" value="org.springframework.batch.core.launch.JobOperator" /> <entry key="spring:service=batch,bean=jobLoader" value="org.springframework.batch.sample.launch.JobLoader" /> </map> </property> </bean> </property> </bean> <bean id="notificationPublisher" class="org.springframework.batch.sample.jmx.JobExecutionNotificationPublisher" /> <bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.MapJobRegistry" /> <bean id="jobOperator" class="org.springframework.batch.core.launch.support.SimpleJobOperator"> <property name="jobExplorer"> <bean class="org.springframework.batch.core.explore.support.JobExplorerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="databaseType" value="${environment}" /> </bean> </property> <property name="jobRepository" ref="jobRepository" /> <property name="jobRegistry" ref="jobRegistry" /> <property name="jobLauncher"> <bean parent="jobLauncher"> <property name="taskExecutor"> <bean class="org.springframework.core.task.SimpleAsyncTaskExecutor" /> </property> </bean> </property> </bean> <bean id="exceptionTranslator" class="org.springframework.batch.core.launch.support.RuntimeExceptionTranslator" /> <bean id="loader" class="org.springframework.batch.sample.launch.DefaultJobLoader"> <property name="registry" ref="jobRegistry" /> </bean> </beans>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy