[jboss-dev-forums] [Design the new POJO MicroContainer] - InstanceClassFactory extension to the ManagedObjectFactory
scott.stark@jboss.org
do-not-reply at jboss.com
Wed Aug 29 17:21:27 EDT 2007
In order to deal with wrapping metadata instances like the ServiceMetaData class, I need to add an InstanceClassFactory plugin to the ManagedObjectFactory. This allows for the management annotations to be on the underlying mbean instance:
| public interface InstanceClassFactory
| {
| /**
| * Return the Class that represents the root ManagedObject to scan
| * for management object related annotations.
| *
| * @param instance - the instance a ManagedObject is to be created for.
| * @return the Class that represents the root ManagedObject.
| */
| public Class<? extends Serializable> getManagedObjectClass(Serializable instance);
| }
|
This allows one to mark up the instance the mbean service wraps. The alternative would be to assume the ServiceMetaData jmx representation is the ManagedObject. I don't think that is generally the case as the interfaces were more a description of the bean service rather than the management interface.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079349#4079349
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079349
More information about the jboss-dev-forums
mailing list