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

scott.stark@jboss.org do-not-reply at jboss.com
Fri Oct 5 13:30:41 EDT 2007


To summarize what we talked about this morning(here), MO is the server side view. We should just add a component name to the ManagedObject interface, along with a ManagementRuntimeRef annotation that can be used to identify which property defines the component name:


  | public interface ManagedObject extends Serializable
  | {
  |    /**
  |     * Get the runtime component name
  |     * @see {@linkplain ManagementRuntimeRef}
  |     * @return name of runtime component if one exists, null if no component exists.
  |     */
  |    String getComponentName();
  | ...
  | 

Beyond that its just a question of how the property value is translated into the getComponentName() value. By default it could just be the property value. It could be another plugin api to obtain the name for a given attachment type/property name at the deployer or AbstractManagedObjectFactory level to go beyond this.

Clients do not deal with ManagedObjects. They deal with ManagedDeployment/ManagedComponents. A ManagedComponent is an extension of ManagedObject currently, so if we want to be clean, either the common client side api could be factored into a common base interface, or ManagedComponent could just be a trimmed down client view of ManagedObject.


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

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



More information about the jboss-dev-forums mailing list