I want to change some runtime configuration of an application deployed on a cluster. For this I want to execute a method that should execute on all the nodes of a cluster.
How can I achieve this?? Does JMX help in this regard??
This depends entirely on the cluster product you are using and the capabilities of your cluster.
However I would suggest that a cluster should be configured and tested for all possible configurations before you deploy the application so changing the configuration at runtime seems very dangerous and or pointless. If you know you need to change something, plan for it and it is no longer a runtime change.
JMX could help, but JMX works by getting under the bonnet and changing an application with JMX probably isn't the best way to have a reliable application.