[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
How can client app read 'election-time' from tc-config?  XML
Forum Index -> General
Author Message
kiwu

journeyman

Joined: 05/20/2008 00:59:21
Messages: 18
Offline

Hi

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?

Cheers

Christian
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

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?

Tim Eck (terracotta engineer)
kiwu

journeyman

Joined: 05/20/2008 00:59:21
Messages: 18
Offline

I have described my motivation in the following postings:

http://forums.terracotta.org/forums/posts/list/1363.page
http://forums.terracotta.org/forums/posts/list/1371.page

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.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.7 © JForum Team