-
1. Re: caching in model mbean
juha Dec 10, 2002 11:12 AM (in response to kramer)Well imagine a case where the mbean actually goes over the network to some device to request the value of that attribute. You don't want that to happen everytime some user loads up the HTML adaptor page.
-
2. Re: caching in model mbean
kramer Dec 10, 2002 2:40 PM (in response to kramer)thanks Juha, that was a good example. I was all the time thinking in terms of agents and mbeans in the same VM. Obviously from your example, that's not always the case.
-
3. Re: caching in model mbean
kramer Dec 10, 2002 4:21 PM (in response to kramer)Thanks Juha. If I understand you correctly this means the agent and the mbean can be in different VMs ?
-
4. Re: caching in model mbean
juha Dec 12, 2002 12:38 PM (in response to kramer)The MBean is in most cases associated with an MBean server. The MBean server can register a proxy in place of the MBean which then delegates the call to another MBean server in a different VM.
However, in the original example, the idea is that you have an MBean on a JVM somewhere which represents your managed resource, such as a network device. To retrieve or set a value on that device, the MBean uses some network protocol to communicate with the device. In such case you usually would not want to go to the wire every time a HTML adaptor page is requested but cache the value in a Model MBean and retrieve the managed attribute value say once every 30 seconds.
So the MBean is in the same VM with the server but the actual managed resource is not an in memory object.