Question

When there are large volumes of steps it takes spring batch admin more than 10 minutes to register step executions during deployment. Since it takes more than 10 minutes to deploy the deployment fails.

The following logs occur for every step:

INFO  [org.springframework.batch.admin.jmx.BatchMBeanExporter] (MSC service thread 1-7) Registering  step execution job-process/do-job-master:1934
INFO  [org.springframework.batch.admin.jmx.BatchMBeanExporter] (MSC service thread 1-7) Located managed bean 'spring.application:type=JobExecution,name=job-process,step=do-job-master@1934': registering with JMX server as MBean [spring.application:type=JobExecution,name=job-process,step=do-job-master@1934]

Why is this happening and how can I disable loading all the step executions on Spring Batch Admin load?

Was it helpful?

Solution

When Spring Batch Admin deploys it registers all step executions with JMX. When you have a large number of step executions in the database it can take a long time to register all of them with JMX. If you do not need JMX you can disable it by overriding the batchMBeanExporter bean in your context. If you must have JMX, then you should seek to reduce the number of steps executions, if thats not possible reach out to Spring.

I disabled JMX by adding the following bean definition to my context files:

<bean id="batchMBeanExporter" class="java.lang.String" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top