Just to make it more clear:

XMBean are based on AbstractMBeanInvoker. When a setAttribute() call is fielded, the 
invocation context is set, then the invocation is executed and finally the attribute 
descriptor is updated in the context and the model mbean info:


  | ...
  |       // create the invocation object
  |       Invocation invocation = new Invocation();
  | 
  |       // copy the server context to the invocation
  |       invocation.addContext(ctx);
  | ...
  |       try
  |       {
  |          // the default invocation implementation will invoke each interceptor
  |          // declared in the invocation context before invoking the target method
  |          invocation.invoke();
  |       }
  | ...
  |       finally
  |       {
  |          /* Obtain the updated attribute descriptor and propagate to the
  |          invocation context and ModelMBeanInfo. The latter is required in
  |          order for getMBeanInfo() to show an updated view. Also required
  |          so that interceptor updates to the attribute descriptor
  |          (e.g. cached values, update timestamp) are propaged, too.
  |          */
  |          Descriptor attrDesc = invocation.getDescriptor();
  |          ctx.setDescriptor(attrDesc);
  |          ModelMBeanInfoSupport minfo = (ModelMBeanInfoSupport) info;
  |          minfo.setDescriptor(attrDesc, ModelMBeanConstants.ATTRIBUTE_DESCRIPTOR);
  | 

The problem is that when the PersistentInterceptor decides to call store(), (because 
e.g. the attribute has been updated and the policy says so), store() in the registered 
persistent manager is called BUT with the ModelMbeanInfo metadata of the XMBean, not 
the call in progress.

Thus, store saves the PREVIOUS attribute cached value (if one exists, because it could 
even not be there, in case this attribute has never been get or set before).

Looking through the code, I can't find where the Attribute Descriptor is actually 
copied. All I see is object references being copied, not a new Descriptor being 
created, but apparently it must happen somewhere.

Any suggestions welcome,

Thanks
/Dimitris

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845261#3845261

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845261


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to