[jboss-dev-forums] [Design of POJO Server] - Re: Getting runtime component name from attachment

alesj do-not-reply at jboss.com
Fri Oct 5 05:48:09 EDT 2007


"adrian at jboss.org" wrote : 
  | Your solution is far from OO.
  | 
:-)
This was initial testing rubbish.

"adrian at jboss.org" wrote : 
  | In fact, it should be on each ManagedProperty since there is no guarantee
  | one ManagedObject maps to one context on the bus.
  | e.g. The DataSource maps to four JMX MBeans (ConnectionManager, ConnectionPool, ConnectionFactory, JNDIBinder).
Yup, my thoughts exactly.
But was somehow surprised this wasn't already the case.

  | public @interface ManagementProperty
  | {
  |    /** The description */
  |    String description() default ManagementConstants.GENERATED;
  | 
  |    /** The external name of the property. If undefined its taken
  |     * from the property the annotation is on.
  |     */
  |    String name() default AnnotationDefaults.EMPTY_STRING;
  | 
  |    /** The internal name of the property as it relates to metadata */
  |    String mappedName() default AnnotationDefaults.EMPTY_STRING;
  | 
  |    /** Whether this property is mandatory */
  |    boolean mandatory() default false;
  |    
  |    /** Whether to create a managed object for the property */
  |    boolean managed() default false;
  |    
  |    /** Whether to ignore this property */
  |    boolean ignored() default false;
  | 
  |    /** The views this property should be used in */
  |    ViewUse[] use() default {ViewUse.CONFIGURATION};
  | 
  |    /** The class to use for the ManagedProperty implementation */
  |    Class<? extends ManagedProperty> propertyFactory() default NULL_PROPERTY_FACTORY.class;
  |    /** The class to use for the ManagedProperty Fields implementation */
  |    Class<? extends Fields> fieldsFactory() default NULL_FIELDS_FACTORY.class;
  |    /** The constraints, allowed values populator factory */
  |    Class<? extends ManagedPropertyConstraintsPopulatorFactory> constraintsFactory()
  |       default NULL_CONSTRAINTS.class;
  | 
  | }
  | 

How should this be added?
Human touch only or is there something 'we' can do/deduct?

Only deduction I see is what you suggested - if it isn't on the MP, then it should be taken from MO, which was set by MOC.

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

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



More information about the jboss-dev-forums mailing list