JMX Management

MyBatchFramework exposes automatically attributes in relation with the execution of the batch, and provide operations to manage its life cycle. The name of the MBean is BatchService.


This attributes gives informations about the batch execution.

numberOfCompletedTaskscurrent number of completed tasks
numberOfFailedTaskscurrent number of failed tasks
statecurrent state of the batch
beginDatebegin date of the batch execution
endDateend date of the batch execution
List of exposed attributes:


This operations can be invoked throw a MBean manager.

NameRequired batch stateDescription
pauserunningsuspends the execution of the batch. Warning : the started tasks are not paused, but waited for termination.
resumesleeping, waiting for launch, waiting for shutdownresume the execution of the batch
shutdownallstop the execution of the batch. Wait for the execution of the submitted tasks before to terminate.
shutdownNowallstop the execution of the batch immediately: the running tasks are stopped abruptly and the submitted tasks are discarded
restartwaiting for shutdownrestart the execution of the batch
List of operations:

An exception is thrown if the state of the batch cannot permit an invoked operation.


A notification is sent each time the state of the batch is changing. (see diagram of batch states)

one powerfull MBean manager: JConsole (distributed with the Sun JVM).
If the JMX management is enabled into the batch configuration, when you must give to the JVM some JMX configuration arguments, like the authentication mode and the remote port. Please refer to a JMX tutorial for more information about it. Here is an example of configuration without authentication or secure connection: