Hi,
Further progress ... I managed to now get it registered as an XMBean.
But I'm b*ggered if I know how this auto-persistence is supposed to work ...
When you change an attribute in your XMBean using the jmx-console, shouldn't it
now write something to $JBOSS_HOME/server/default/data/xmbean-attrs/
??
(I set persist policy to 'OnUpdate')
What's missing?
TIA
My new code:
work.MyClass mBean = new work.MyClass();
ObjectName objectName = new ObjectName("mydomain.com:job=MyJob,id=" +
System.identityHashCode(mBean));
Descriptor d = new DescriptorSupport();
d.setField(XMBeanConstants.RESOURCE_REFERENCE, mBean);
d.setField(XMBeanConstants.RESOURCE_TYPE, XMBeanConstants.STANDARD_MBEAN);
d.setField(ModelMBeanConstants.PERSIST_NAME, objectName);
d.setField(ModelMBeanConstants.PERSIST_POLICY, "OnUpdate");
d.setField(ModelMBeanConstants.PP_NEVER, "false");
d.setField(ModelMBeanConstants.PERSISTENCE_MANAGER,
"org.jboss.mx.persistence.DelegatingPersistenceManager");
XMBean mmb = new XMBean(d, XMBeanConstants.DESCRIPTOR);
server.registerMBean(mmb, objectName);
invokeStringMethod(objectName, "setTestMethod", aTestValue);
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981279#3981279
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981279
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user