We need to clarify the usage of the names in the ManagedObject graphs for the purposes of
references between related ManagedObjects and references to the underlying runtime
component. The current mechanism for naming a ManagedObject is based on the
@ManagementObjectID - annotation that identifies a ManagedObject key/type qualifier
source. Generally this is on a property without a name value so that the actual name comes
from the property value, as this JBossManagedConnectionPool example shows:
| @ManagementObjectID(type="DataSource")
| @ManagementProperty(use={ViewUse.RUNTIME})
| public String getPoolJndiName()
| {
| return this.poolJndiName;
| }
|
@ManagementObjectRef - indicates a property that references another ManagedObject. This
ManagedConnectionFactoryDeploymentMetaData example shows a property refencing the jmx
invoker ManagedObject:
| @ManagementProperty(name="jmx-invoker-name")
| @ManagementObjectRef(type="JMXInvoker")
| public String getJmxInvokerName()
| {
| return jmxInvokerName;
| }
|
@ManagementRuntimeRef - annotation that can be used to identify which property defines
the runtime component name. This annotation takes a transformer:
| public interface RuntimeComponentNameTransformer
| {
| /**
| * Transform the name from string.
| *
| * @param value current name value
| * @return transformed name
| */
| Object transform(Object value);
| }
|
this is used to identify what the name of the runtime kernel component is. For an mcf
deployment, this should be doing the same mapping logic the
ManagedConnectionFactoryBuilder.buildObjectName method does in transforming the jndiName
property into an ObjectName:
| public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
| {
| return ObjectNameFactory.create(MCF_JMX + md.getJndiName());
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114515#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...