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

alesj do-not-reply at jboss.com
Fri Oct 5 14:26:36 EDT 2007


"scott.stark at jboss.org" wrote : 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();
  |   | ...
  |   | 
  | 
I'll hack this part tomorrow in the morning.

"scott.stark at jboss.org" wrote : 
  | 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.
  | 
I think some kind of translator could be added to AbstractManagedObjectFactory  - e.g. translate ObjectName to ObjectName.getCanonicalName.
Or it can already be a part of @ManagementRuntimeRef.

"scott.stark at jboss.org" wrote : 
  | 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.
  | 
I think we can have a common interface which both MO and MC would extend, stripping some details from MC.
I'll push in the initial common interface, and you can still refactor it later.

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

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



More information about the jboss-dev-forums mailing list