[jboss-dev-forums] [Design the new POJO MicroContainer] - Need a NamedObject SimpleMetaType

scott.stark@jboss.org do-not-reply at jboss.com
Wed Aug 1 14:51:47 EDT 2007


In working with ManagedObjects that contain properties that are references to other ManagedObjects, I need to be able to represent this type of property, so I want to introduce a SimpleMetaType NAMEDOBJECT. This is equivalent to the jmx SimpleType. The only problem with this is that unlike jmx, there is no entry point for resolving the NAMEDOBJECT. The value of a NAMEDOBJECT property is simply the referenced object name. The issue is, what is the reference resolver. The only logical place is the add support for this to the ManagedObject interface:


  | interface Name
  | {
  |    String getName();
  | }
  | 
  | public interface ManagedObject extends Serializable
  | {
  | ...
  |    /**
  |     * Resolve a named object reference.
  |     * 
  |     * @param name - the reference name to resolve
  |     * @return the ManagedObject the name resolves to if found,
  |     *    null otherwise.
  |     */
  |    ManagedObject resolveName(Name name);
  | }
  | 

This looks like containment, but in general it will not be and the ManagedObject impl needs some registry impl. Maybe there should just be a property ManagedObjectRegistry api for this and that is where the resolution has to be done as well.


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

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



More information about the jboss-dev-forums mailing list