[jboss-dev-forums] [Design of POJO Server] - Re: Getting runtime component name from attachment
alesj
do-not-reply at jboss.com
Tue Oct 9 03:54:41 EDT 2007
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#4092882
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092882
More information about the jboss-dev-forums
mailing list