[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBMICROCONT-181 & ManagedDeployments

adrian@jboss.org do-not-reply at jboss.com
Wed Jul 25 16:04:56 EDT 2007


Sounds reasonable, except the dropping of the ManagedObject.

The ManagedObject is meant to behave like an MBean, both for a
deployment descriptor as a whole but more convienantly for the lowest 
unit of management (what I think you call components).

I also argued that you should be able to use it for smaller parts of the
deployment descriptor but that's irrelevant to this discussion, I think?

The way I originally thought it would work was that a -ds.xml
would really be little more than a collection of managed objects
and the MCF deployer work be just to create ManagedObjects for individual
datasources and connection factories (I know there's other things that can
go in a -ds.xml, e.g. mbeans - these would be other managed objects in the collection).

The top level managed object would know how to "reconstruct" the -ds.xml
from the individual pieces, or preferably the lower managed objects
would know where they fit in the whole.

The ejb deployer would be similar with a collection of EJB managed objects
and seperate one for the "deployment level" stuff.

The idea being it is pretty easy for the deployer writers to create ManagedObjects
(around their deployment descriptors - or more correctly parts of them)
if we add the framework that knows how to present the descriptors (and update them)
from annotations or xml) - we're really just wrapping their annotated metadata
which they've told us how to map.

This looks very similar to your ManagedComponent but it doesn't have
the notion of getting the attachment back again for the top level managed object
(the whole deployment descriptor) so it can set it in the "predetermined managed objects" for (re)deployment.

Where the disconnect occurs (to me) is there is no idea of top level managed object
(or top level managed component if you like) at all.

The only aggregate is the ManagedDeployment. But the deployer writers don't
(and shouldn't) care about this. e.g. The ejb deployer doesn't care if there is
also a META-INF/log4j.xml in an ejb jar, its irrelevant and orthogonal.

In summary:
I think ManagedComponent is really just a ManagedObject
under a different name and with extra information. 
But it no longer serves the original purpose intended, i.e. of dealing with
management at the "atomic level" but also knowing where/how it fits in the 
"bigger picture".

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

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



More information about the jboss-dev-forums mailing list