Dec 12th, 2006, 12:52 PM
Expose bean attributes after deployment?
I have been looking at various docs regarding Spring and JMX. I was hoping that Spring JMX would allow me to dynamically expose/hide bean attributes once a bean has already been deployed.
Given the scenarios below, are any of these possible in Spring?
1. A Spring bean has been deployed and is being used, let's assume it is a singleton. It carries some useful data, but because it was not deployed originally as an MBean in Spring, its data is not readily available via a JMX console.
a. Is there anyway to dynamically expose this bean's attributes via JMX without restarting the system or redeploying the bean and losing all the data in the bean?
b. Is there anyway to view the bean's attributes from some other means other than JMX? Is there another mechanism in Spring that will allow let's say an administrator to see the data from this bean?
2. A Spring bean has attributes a, b and c, all ints. This bean has been deployed as an MBean to expose attributes a and b. Once this bean has been deployed and is being used, is there any way to expose attribute c without restarting the service or redeploying the bean? Is this possible with Spring JMX or from some other Spring technology?
3. Are there other means for extracting the data from a Spring bean?
A classic case is when a production service has been running for a while, and more information needs to be provided than what's currently available from JMX or the log files.