All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.spring.batch.bootstrap.manager.execution-context.xml Maven / Gradle / Ivy

Go to download

Web and service tier of Spring Batch Admin console. Basic use cases include visualization of Batch meta data, and also launching and stopping jobs inside the webapp container.

There is a newer version: 1.3.1.RELEASE
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

	<!-- Workaround for INT-1831 -->
	<bean id="dummy" class="java.util.Date" />

	<context:annotation-config />

	<bean class="org.springframework.batch.core.scope.StepScope" />

	<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
		<property name="jobRepository" ref="jobRepository" />
		<property name="taskExecutor" ref="jobLauncherTaskExecutor" />
	</bean>

	<task:executor id="jobLauncherTaskExecutor" pool-size="6" rejection-policy="ABORT" />

	<task:executor id="poolTaskExecutor" pool-size="600" rejection-policy="CALLER_RUNS" />

	<bean id="throttledTaskExecutor" class="org.springframework.batch.admin.util.ThrottledTaskExecutor">
		<property name="taskExecutor" ref="poolTaskExecutor" />
	</bean>

	<bean id="jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"
		p:dataSource-ref="dataSource" p:transactionManager-ref="transactionManager" />

	<bean id="jobExplorer" class="org.springframework.batch.core.explore.support.JobExplorerFactoryBean"
		p:dataSource-ref="dataSource" />

	<bean id="jobLoader" class="org.springframework.batch.core.configuration.support.AutomaticJobRegistrar">
		<property name="applicationContextFactories">
			<bean class="org.springframework.batch.core.configuration.support.ClasspathXmlApplicationContextsFactoryBean">
				<property name="resources" value="classpath*:/META-INF/spring/batch/jobs/*.xml" />
			</bean>
		</property>
		<property name="jobLoader">
			<bean class="org.springframework.batch.core.configuration.support.DefaultJobLoader">
				<property name="jobRegistry" ref="jobRegistry" />
			</bean>
		</property>
	</bean>

	<bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.MapJobRegistry" />

	<bean id="jobService" class="org.springframework.batch.admin.service.SimpleJobServiceFactoryBean">
		<property name="jobRepository" ref="jobRepository" />
		<property name="jobLauncher" ref="jobLauncher" />
		<property name="jobLocator" ref="jobRegistry" />
		<property name="dataSource" ref="dataSource" />
	</bean>

	<task:scheduled-tasks>
		<task:scheduled ref="jobService" method="removeInactiveExecutions" fixed-delay="${batch.job.service.reaper.interval}"/>
	</task:scheduled-tasks>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy