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.
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.
Thanks Juha. If I understand you correctly this means the agent and the mbean can be in different VMs ?
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.