In my web application I would like to read the value of the election-time property of the tc-config.xml that is used. I understand that I might use JMX for that purpose. What is the easiest/best practice way of doing this?
I don't know of MBean that has that information in it. A moderate hack would be to access 'http://terracotta-server:9510/config' and parse the XML available there.
Just to better understand things, do you mind sharing why you want to programttically determine that value? What logic in your application will depend on it?
The election time is used in my application in a listener to calculate the appropriate delay for the timer that disables my clustered ehcache. I managed to get the config as xml via JMX (L1 Info Bean) and then I parse the xml to get the value. That works fine.