This would/does produce a CCE with the current code:
In AbstractManagedObjectFactory.getValue
Property is not managed, so we resolve to a simple metattype
| if (managed)
| {
| TypeInfo typeInfo = propertyInfo.getType();
| if( typeInfo.isArray() || typeInfo.isCollection() )
| metaType = new ArrayMetaType(1, MANAGED_OBJECT_META_TYPE);
| else
| metaType = MANAGED_OBJECT_META_TYPE;
| }
| else
| {
| metaType = metaTypeFactory.resolve(propertyInfo.getType());
| }
|
And since metatype is not managed we push in simple value
| return metaValueFactory.create(value, propertyInfo.getType());
|
But on the ManagementViewImpl.processManagedObject
// See if this is a ManagementObjectRef
| ManagementObjectRef ref = (ManagementObjectRef)
pannotations.get(ManagementObjectRef.class.getName());
| if ( ref != null )
| {
| // The reference key is the prop value + ref.type()
| log.debug("Property("+prop.getName()+") references:
"+ref);
| SimpleValue refValue = (SimpleValue) prop.getValue();
| String refName = (String) refValue.getValue();
| if (refName == null)
| refName = ref.name();
| String targetKey = refName + "/" + ref.type();
|
refValue.getValue() is an Integer, since our property returned max-pool-size. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092882#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...